I got the following error when running my first HelloWorld Windows phone 7 application.
Could not load the assembly file://\linkdotnet.local\linkdev\salma.mohamed\my documents\visual studio 2010\Projects\Assign1\Assign1\obj\Debug\Assign1.dll. This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information.
Any Idea how to resolve it. Thanks alot in advance.
There are some workarounds for this issue: The dll file may not be in /bin folder. Just copy the dll file to /bin folder or set this preference Copy Local = True from Visual Studio. If the problem persists, check if the version of the assembly that is referenced is different than the version it is looking for.
The solution is to compile the Interop yourself: 1 - Unregister your dll and the Interop from the GAC. The /machine:Agnostic causes the Interop to be built targeting the MSIL Processor Architecture, which is the same as my dll. 6 - Add a reference in your project to the new Interop.
Restart Visual Studio, clean and build a solution. Remove the class library references and add it again. Tools > Import and Export Settings Wizard > Reset all settings (maybe some setting was not well configured).
The located assembly's manifest definition does not match the assembly reference. As stated, this is caused when the version of a . dll file in the /bin directory (assembly reference), is not the same as specified in the web. config (assembly manifest).
I am assuming this assembly was in a zip file you downloaded from the internet? if that is the case you need to 'unblock' it. Right click the assembly within Windows Explorer, the click the 'unblock' button. See the example below:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With