I've seen it the first time when using the .NET 4.0 framework. The error means that you should redirect all references of a DLL to the newest version of that DLL.
Do the following:
- In SharpDevelop -> Tools/Options/Projects and Solutions/Build Verbosity: Diagnostic
- Now you can see the conflict in detail. Activate the output by -> View/Output.
- Rebuild the project.
- Search for "conflict" in the output.
- The DLL that's resolved before the conflict is the conflicting DLL. For example it prints: Dependency "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Create an app.config that looks like:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="mscorlib" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="1.0.3300.0 - 2.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="1.0.3300.0 - 2.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="1.0.3300.0 - 3.5.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
</configuration>
The last entry is the conflicting System.Web DLL that we have found by investigating the output. All versions of the System.Web DLL are now redirected to the 4.0.0.0 version of that DLL.
Now, the warning is gone when rebuilding.
Don't forget to turn off the diagnostic Building! It is much slower!
The mscorlib, System, System.Web assembly redirects are just samples. Redirect as many DLL's as needed.
Geen opmerkingen:
Een reactie posten