이 코드를 하나의 C# 프로젝트에서 실행합니다. 파일이 프로젝트의 루트에 있습니다. Ant는 항상 복사 할 출력 디렉토리로 복사를 설정했습니다.다른 프로젝트의 OutputDirectory에 XML 복사
XDocument fileConfigXml = XDocument.Load("FileConfig");
해당 프로젝트가 다른 프로젝트에서 호출되고 있습니다.
내가 얻을 :
System.IO.FileNotFoundException was unhandled
HResult=-2147024894
Message=Could not find file 'C:\Users\user\SolutionName\OtherPriect\bin\Debug\FileConfig.xml'.
내가 발신자 프로젝트에 XML 파일을 복사하거나 국내 프로젝트를 형성 읽을 수 있습니까?
XDocument를 작성한 곳 fileConfigXml = XDocument.Load ("FileConfig"); – Ganesh
@Ganesh 비 실행 프로젝트입니다. – eomeroff