.NET의 XmlDataProvider
개체에서 Source
속성을 설정할 때 상대 URI를 사용할 수 있습니까? 내가 상대 URI를 사용하려고 할 때XmlDataProvider의 소스로 상대 URI 사용
provider.Source = new Uri(@"C:\bin\Configuration.xml", UriKind.Absolute);
그러나 나는 예외를 얻을 :
IOException:System.IO.IOException: Cannot locate resource 'configuration.xml'.
나는 절대 URI를 사용하여 Source
속성을 설정, 모든 것이 예상대로 작동 : 나는 다음과 같은 예외가
provider.Source = new Uri(@"Configuration.xml", UriKind.Relative);
내 어셈블리는 모두 구성 파일과 동일한 디렉터리에 있습니다. 여기 뭐가 잘못 됐니?