Search code examples
.netvisual-studiovisual-studio-2008visual-studio-2010assemblies

Referenced Assembly won't load


I've got a visual studio 2010 project which publishes an assembly called myAssembly.ddl. I then want to reference myAssembly.dll from an existing vs 2008 project. If I try to load the reference it comes up with an yellow exclamation mark next to it, suggesting that the assembly wasn't loaded. However, I'm not getting any error messages during that process. Obviously, if i try to import the namespace in my code it doesn't compile.

Converting myAssembly.dll to a .net version 3.5 doesn help. Nor does copying the assembly to a different directory and referencing it from there.

Any ideas?


Solution

  • Which .NET Framework are you using to build the solution in Visual Studio 2008?

    It needs to be version 3.5 in order to allow you to utilize the myAssembly.dll that you compiled with the 3.5 framework. Visual Studio 2008 will allow you to target the 2.0 Framework or even the 3.0 Framework.

    Visual Studio 2008

    Project > Properties > Application tab Look for Target Framework