다른 위치 (다른 디스크)에 저장된 구성 파일에서 System.Configuration.Configuration을로드하려고합니다. 그러나 다음을 얻고 있습니다 ...로드 문제 Configuration
예외 : SectionName에 대한 구성 섹션 처리기를 만드는 동안 오류가 발생했습니다 : 파일 또는 어셈블리 '어셈블리'또는 해당 종속성 중 하나를로드 할 수 없습니다.
FileStream fileStream = new FileStream(@"c:\fancyFile.xml", FileMode.CreateNew);
fileStream.Write(MyProject.Resources.Resource, 0, MyProject.Resources.Resource.Length);
fileStream.Close();
System.Configuration.ConfigurationFileMap fileMap = new ConfigurationFileMap(@"c:\fancyFile.xml");
MyProject.Configuration conf = MyProject.Configuration.GetConfiguration(@"c:\fancyFile.xml").GetSection("MySection") as MyProject.Configuration;
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="MySection" type="MyProject.Configuration, MyProject" allowLocation="true" allowDefinition="Everywhere" />
</configSections>
<MySection>
하지만 같은 assmebly에서로드하려고합니다. 필자는 더 많은 소스로 내 질문을 업데이트했습니다. 당신이 나를 도울 수 있기를 바랍니다. – dknaack