Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conflicting Assembly References

I was downloading the master branch of the Orchard CMS. After compliation there was a Warning regarding Orchard.Workflows.

I tried this tool: https://github.com/mikehadlow/AsmSpy

And the result is that I have a lot of conflictis.

So I really assume I am doing something wrong here. Is there something I am missing?

enter image description here

I get these results when I run AsmSpy agains the Release folder after compilation.

This is the original warning I want to get rid off:

Project: Orchard.Workflows

File: C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets

Description: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.

like image 532
Matthias Avatar asked May 21 '26 22:05

Matthias


1 Answers

You will always get some reference warnings, at least most of the time as we are using a very broad set of open source softwares. For instance ASP.NET Web API is still linking to a specific version of Json.NET 4.5 and we are using Json.NET 6.0. We are setting assembly redirections to force which version to use.

In your example you can also see that NHibernate was compiled against CLR 2.0 for instance. Only the next version will be using CLR 4.0.

So the rule is that as long as it works, ignore the warnings. However it's interesting to take a look at them from time to time as it might be something we can fix. As explained in the warning, enable the verbose build log and the sources for these conflicting versions will be explained.

Update: I fixed the warning !

like image 64
Sébastien Ros - MSFT Avatar answered May 24 '26 11:05

Sébastien Ros - MSFT



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!