brockallen / BrockAllen.MembershipReboot

MembershipReboot is a user identity management and authentication library.
Other
742 stars 238 forks source link

Build warning MSB3247: conflicting version of MembershipReboot 8.0.0 and 8.3.0 #530

Closed sheam closed 8 years ago

sheam commented 9 years ago

I set my build output to diagnostic and got this:

There was a conflict between "BrockAllen.MembershipReboot, Version=9.3.0.0, Culture=neutral, PublicKeyToken=null" and "BrockAllen.MembershipReboot, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null". (TaskId:45)
2>      "BrockAllen.MembershipReboot, Version=8.3.0.0, Culture=neutral, PublicKeyToken=null" was chosen because it was primary and "BrockAllen.MembershipReboot, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null" was not. (TaskId:45)
2>      References which depend on "BrockAllen.MembershipReboot, Version=8.3.0.0, Culture=neutral, PublicKeyToken=null" [D:\Users\Shea.Wilbur\Code\Mine\strange-brew\StrangeBrewWeb\packages\BrockAllen.MembershipReboot.8.3.0\lib\net45\BrockAllen.MembershipReboot.dll]. (TaskId:45)
2>          D:\Users\Shea.Wilbur\Code\Mine\strange-brew\StrangeBrewWeb\packages\BrockAllen.MembershipReboot.8.3.0\lib\net45\BrockAllen.MembershipReboot.dll (TaskId:45)
2>            Project file item includes which caused reference "D:\Users\Shea.Wilbur\Code\Mine\strange-brew\StrangeBrewWeb\packages\BrockAllen.MembershipReboot.8.3.0\lib\net45\BrockAllen.MembershipReboot.dll". (TaskId:45)
2>              BrockAllen.MembershipReboot, Version=8.3.0.0, Culture=neutral, processorArchitecture=MSIL (TaskId:45)
2>      References which depend on "BrockAllen.MembershipReboot, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null" []. (TaskId:45)
2>          D:\Users\Shea.Wilbur\Code\Mine\strange-brew\StrangeBrewWeb\packages\BrockAllen.MembershipReboot.Ef.8.0.0\lib\net45\BrockAllen.MembershipReboot.Ef.dll (TaskId:45)
2>            Project file item includes which caused reference "D:\Users\Shea.Wilbur\Code\Mine\strange-brew\StrangeBrewWeb\packages\BrockAllen.MembershipReboot.Ef.8.0.0\lib\net45\BrockAllen.MembershipReboot.Ef.dll". (TaskId:45)
2>              BrockAllen.MembershipReboot.Ef, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL (TaskId:45)

Should I not be using version 8.3?

brockallen commented 9 years ago

Yea, upgrade.

sheam commented 9 years ago

Data layer has nugets: MembershipReboot 8.3, and MembershipReboot.Ef 8.0.0, with no updates available. Service layer has nugets: MembershipReboot 8.3, and MembershipReboot.Ef 8.0.0, with no updates available. My presentation layer (controllers/mvc/etc): MembershipReboot 8.3, and MembershipReboot.WebHost 7.1.0, with no updates available.

Do I need to enable pre-release packages?

brockallen commented 9 years ago

so if no updates available, then i'm confused about the error -- is this just that the EF is bound to an older version of MR? if that's the case, then do binding redirects. otherwise i'm confused.

sheam commented 9 years ago

Yeah, I am confused too...

Just run update all packages, and restarted VS. After weeks the error seems to have gone away.

Previously, I had blown away packages directory, reinstalled the, updated all, built clean, etc, and nothing seemed to fix it.

But now it seems fine. The only package that seems to have been updated which is remotely connected is System.IdentityModel which went from 1.0 to 4.2! Not sure what was going on there.

Ok, sorry to waste your time.

dasch88 commented 8 years ago

I am running into a similar issue now regarding a binding conflict between MembershipReboot 8.4 and 8.0. Similar to @sheam, sometimes if I clean the project and reopen visual studio, it goes away. However once I rebuild the project it comes back.

I would love to do a binding redirect, but the assemblies from nuget are not strongly named, so binding redirects are ignored.

It appears this happens if you have multiple projects, multiples referencing the latest MembershipReboot nuget package, and only one referencing the latest MembershipReboot.Ef package.

3> There was a conflict between "BrockAllen.MembershipReboot, Version=8.4.0.0, Culture=neutral, PublicKeyToken=null" and "BrockAllen.MembershipReboot, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null". 3> "BrockAllen.MembershipReboot, Version=8.4.0.0, Culture=neutral, PublicKeyToken=null" was chosen because it was primary and "BrockAllen.MembershipReboot, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null" was not. 3> References which depend on "BrockAllen.MembershipReboot, Version=8.4.0.0, Culture=neutral, PublicKeyToken=null" [C:\Users\david\Projects\Web\packages\BrockAllen.MembershipReboot.8.4.0\lib\net45\BrockAllen.MembershipReboot.dll]. 3> C:\Users\david\Projects\Web\packages\BrockAllen.MembershipReboot.8.4.0\lib\net45\BrockAllen.MembershipReboot.dll 3> Project file item includes which caused reference "C:\Users\david\Projects\Web\packages\BrockAllen.MembershipReboot.8.4.0\lib\net45\BrockAllen.MembershipReboot.dll". 3> BrockAllen.MembershipReboot, Version=8.4.0.0, Culture=neutral, processorArchitecture=MSIL 3> References which depend on "BrockAllen.MembershipReboot, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null" []. 3> C:\Users\david\Projects\Web\packages\BrockAllen.MembershipReboot.Ef.8.0.0\lib\net45\BrockAllen.MembershipReboot.Ef.dll 3> Project file item includes which caused reference "C:\Users\david\Projects\Web\packages\BrockAllen.MembershipReboot.Ef.8.0.0\lib\net45\BrockAllen.MembershipReboot.Ef.dll". 3> BrockAllen.MembershipReboot.Ef, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL

Any thoughts on how to proceed?

brockallen commented 8 years ago

Is that just a matter of updating each project's NuGet reference? I guess I've never really run into this issue..

dasch88 commented 8 years ago

That's what I thought to at first, until I checked and all packages were the most recent version. I even reinstalled all the MembershipReboot packages without success.

It's it possible that internally the MembershipReboot.EF assembly is referencing v8.0.0 of MembershipReboot? On May 11, 2016 8:13 AM, "Brock Allen" notifications@github.com wrote:

Is that just a matter of updating each project's NuGet reference? I guess I've never really run into this issue..

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/brockallen/BrockAllen.MembershipReboot/issues/530#issuecomment-218441382

dasch88 commented 8 years ago

Wow that's formatted weird... That's what I get for replying via email :)

brockallen commented 8 years ago

Not sure... I can check.

dasch88 commented 8 years ago

Great, thank you--I appreciate it!

brockallen commented 8 years ago

Just reopening to remind me to look... still swamped from travel

dasch88 commented 8 years ago

So I was able to get it fixed. It turned out that in my multi-project solution, I had two projects that were referencing two different versions of System.Web.Http. After getting that fixed (I had used "Copy Reference" within visual studio instead of downloading the nuget package like I should have), then I uninstalled and reinstalled all of the MembershipReboot nuget packages. After that--and some deleting of the packages folder, restoring nuget packages, and reopening visual studio--it finally went away!!

Good to know that other reference mismatches can cause more down the line that aren't necessarily related :)

brockallen commented 8 years ago

Sorry I wasn't able to find the time to help on it, but good to hear and a pain to track down.

sheam commented 8 years ago

I am getting these errors again. Using AsmSpy, I can see that that BrockAllen.MembershipReboot.Ef depends on BrockAllen.MembershipReboot 8.0, and BrockAllen.MembershipReboot.WebHost depends on version 7.11.

So we either need an updated version of those two that depend on the 8.4 version of BrockAllen.MembershipReboot, or downgrade everything to 7.1 I guess.... which doesn't feel very good to be running old version of authentication software.

Other option is to download source and fix it... I'll live with the warnings for now. ~S