开发者

Mono - Could not load file or assembly

i just exported my project to my new imac an loaded my solution into monodevelop. After the successfully compilation i started the project, and i always getting the same error.

** (/Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/2.0/xsp2.exe:1576): WARNING **: The following assembly referenced from /private/var/folders/9y/9ypfv24bEwieHw+Yy+PUsU+++TI/-Tmp-/nhu-temp-aspnet-0/ebc9e2c6/assembly/shadow/7f5f6265/859daf16_fac2cd73_00000001/Centrism.Administration.UI.dll could not be loaded: Assembly: Centrism.Core (assemblyref_index=3) Version: 0.0.3688.40278 Public Key: (none) The assembly was not found in 开发者_如何学Gothe Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/var/folders/9y/9ypfv24bEwieHw+Yy+PUsU+++TI/-Tmp-/nhu-temp-aspnet-0/ebc9e2c6/assembly/shadow/7f5f6265/859daf16_fac2cd73_00000001/).

** (/Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/2.0/xsp2.exe:1576): WARNING **: Could not load file or assembly 'Centrism.Core, Version=0.0.3688.40278, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

In other projects the assembly works correct and can be loaded.


I had the same problem with a dll that was in the same path as the application assembly, the problem was that the dll name had a different case than the expected one. So the Abc.dll was missing, in the folder it was named abc.dll, after renaming, it worked.


I guess I'm going to ask the obvious:

Do you have Centrism.Core.dll somewhere that Mono knows about and can get to?


If your project is referencing the Centrism.Administration.UI.dll, and it is not in the GAC on your iMac, the easiest solution would probably be to set the reference to that assembly to "Local Copy". For web projects, this will copy the assembly into the application's Bin directory, where xsp should be able to pick it up.


I had this error when adding a new assembly to an existing project (which itself was referenced by a unit test project).

Because the assembly wasn't included in both projects, the unit test would error out. The solution was to add a Copy tag to the project file:

<Copy SourceFiles="$(ProjectDir)\dlls\NewAssembly.dll" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true" />

Presumably it would also work to add the reference directly to the unit test (this reference is not used directly, so was able to avoid using above).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜