Nuget Assembly reference Microsoft Owin after upgrade to 3.0.1

做~自己de王妃 提交于 2019-12-10 18:53:19

问题


In the package manager it states the version is 3.01, But when I build the project in Visual Studio 2013, is gives this message. I have looked everywhere and can't find a reference to Microsoft Owin 3.0 except in web.config. It is 3.0.1 in the packages.config file. In the web.config all the Owin files still say 3.0.0. Please let me know if there is anything I can do beside remove Owin from the project.

Error 6 Assembly 'Microsoft.Owin.Host.SystemWeb, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.Owin, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'


回答1:


I had the same issue, when changed Microsoft.Owin 3.0.1 to 3.0.0.

To resolve, unload the project, open *.csproj, remove everything except Include from this line Reference Include="Microsoft.Owin", Version... .




回答2:


I had the same issue and the following 2 nuget commands resolved my issue:

Install-Package Microsoft.Owin.Host.SystemWeb -version 3.0.1

Install-Package Microsoft.AspNet.Identity.Owin -version 3.0.1

The force on version number to make them match seemed to be the magic.




回答3:


Right click on the the solution file in Visual Studio, go to Manage Nuget Packages, search for Owin and Install Microsoft Owin. Rebuild your project afterwards




回答4:


Ran into this issue when trying to add Authentication to existing project. Found that you need make sure that all projects using the OWIN Security have to be on the same version otherwise the error is essentially complaining about version mismatches. Like another person suggested, You can use the Nuget Package Manager to align the versions (or get the latest).



来源:https://stackoverflow.com/questions/30249980/nuget-assembly-reference-microsoft-owin-after-upgrade-to-3-0-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!