Could not load file or assembly Microsoft.Owin 3.0.0 to 3.0.1

Just to comment here that I saw this type of error when I upgraded to 4.1.0.0 and my issue was on Web.config where I still had 4.0.1.0. So, what you have in .csproj should match what is in Web.config. Updating or reinstalling did nothing in my case until I synced up the version numbers.


Could not load file or assembly 'Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

In general, this means that the .NET Assembly loader could not find the assembly with specific version that was referenced. Please make sure this assembly with version 3.0.1.0 could be found in your Azure website and the version matches the definition in your web.config via KUDU or FTP client.

As you said, it works locally on IIS Express, please try to deploy your website content manually to Azure via KUDU or FTP client and find out whether it works or not.


I wasted a couple of hours on this too because the reference installed by nuget had version 3.0.0 despite the nuget package being labelled 3.0.1

Making the old version newer than the new version fixed my problem:

      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
      </dependentAssembly>

*Edit: I think(but not certain) that the reason my version was still 3.0.0.0 was because the bin folder got caught in my repo and nuget didn't want to write over the dll


It requires a new version instead of the one that you currently have. If you are using Visual Studio right click the project --> Manage NuGet Packages --> Updates --> select the Owin nuget --> Click "Update". As of today, the latest version is 4.0.0. Hope it works out fine!

Tags:

C#

.Net

Azure