Exception: "The assembly used at compilation may be different from that used at boot, but the type is missing."

I am creating a Prism application with several modules, one of which ( MyModule) contains the user control ( MyUserControl) that I created. MyUserControlworks fine, but when I add it to MyModuleand run the application, I get this exception:

"The type cannot be found MyUserControl. The assembly used at compilation may be different from that used at boot, but the type is missing."

I can fix the error by adding a link to the MyUserControlShell application. But, of course, this defeats the whole purpose of Prism, since the shell does not use MyUserControl- only MyModuleuses it.

MyUserControl is based on the WPF calendar control from the WPF toolkit, which seems to have a similar problem. I have another user control in another module that is not dependent on the WPF Toolkit, and I am not getting this exception for this control.

Any suggestions for fixing this problem without connecting Shell to MyUserControl? Thank.

+3
source share
1 answer

, MyUserControl.dll, ( ), - post build. MyUserControl, , "Build Events" Post-build: xcopy $(TargetFileName) $(SolutionDir)\ APP\bin\Debug\Modules \/Y , MyUserControl , , , , .

+3

Source: https://habr.com/ru/post/1733244/


All Articles