나는 당황하고 있습니다. WPF 솔루션을 사용하여 다양한 뷰를 별도의 프로젝트로 분할했습니다. 나 또한 내 사용자 지정 컨트롤 프로젝트가 있습니다. 마지막으로, 내 응용 프로그램은 기본 프로젝트로 설정된 다른 프로젝트에 있습니다.조립품을로드 할 수 없습니다.
내 기본 창과 내 다른보기 모두 사용자 지정 컨트롤 프로젝트에서 컨트롤을 사용합니다. 모든 프로젝트는 사용자 지정 컨트롤을 사용하는 두 번째보기를 제외하고 성공적으로 빌드됩니다.
예제 앱에서이를 복제 할 수 없었지만 여기서 설명하기 위해 최선을 다할 것입니다. 이 (매우 조)의 예에서
MySolution
MyApp.csproj
References
MyMainWindow
MySecondWindow
MyThirdWindow
MyViewModels
[std WPF references]
App.xaml
App.xaml.cs
MyMainWindow.csproj
References
MyControls
[std WPF references]
MainWindow.xaml
MainWindow.xaml.cs
MySecondWindow.csproj
References
[std WPF references]
SecondWindow.xaml
SecondWindow.xaml.cs
MyThirdWindow.csproj
References
MyControls
[std WPF references]
ThirdWindow.xaml
ThirdWindow.xaml.cs
MyControls
References
[std WPF references]
ControlForMainWindow.xaml
ControlForMainWindow.xaml.cs
ControlForThirdWindow.xaml
ControlForThirdWindow.xaml.cs
는 MyMainWindow 프로젝트와 MyThirdWindow 프로젝트 기준과 동일하다. MyThirdWindow를 제외한 모든 프로젝트가 성공적으로 빌드됩니다. 내가 얻는 오류는 다음과 같습니다.
Could not load file or assembly '[MyControls]' or one of its dependencies.
The system cannot find the file specified.
겉보기에는 동일한 프로젝트가 실패 할 때 한 프로젝트가 빌드되는 이유를 아는 사람이 있습니까?
편집 1 : 내가 MyThirdWindow에서 ControlForThirdWindow (및 네임 스페이스 선언)을 제거 (그러나 프로젝트 참조를 떠나) 경우 전체 솔루션은 구축 및 응용 프로그램 실행
MyMainWindow 여전히 ControlForMainWindow를 사용하더라도. 네임 스페이스 선언이 정확하다는 것을 확인했습니다. (MyMainWindow에서 복사했습니다)