title: Could not locate the assembly "Microsoft.Owin..." (and more) after updating Nuget
body: <p>I updated Nuget for a project today (many MS packages were 5.0 now) ... but now I get these errors when compiling:</p>
  <pre><code>1&gt;------ Build started: Project: IcSso.Client.DotNetFramework, Configuration: Debug Any CPU ------
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly &quot;Microsoft.Owin, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot;. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly &quot;Microsoft.Owin.Security, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot;. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly &quot;Microsoft.Owin.Security.Cookies, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot;. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly &quot;Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot;. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly &quot;System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot;. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly &quot;System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot;. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly &quot;System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot;. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly &quot;System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot;. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly &quot;System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot;. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly &quot;System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot;. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  1&gt;D:\Develop\Projects\_Ic\IcSso\IcSso.Client.DotNetFramework\AuthHelper.vb(5,9): warning BC40056: Namespace or type specified in the Imports 'System.Web.Mvc' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
  1&gt;D:\Develop\Projects\_Ic\IcSso\IcSso.Client.DotNetFramework\AuthHelper.vb(10,44): error BC30002: Type 'Microsoft.Owin.IOwinContext' is not defined.
  1&gt;D:\Develop\Projects\_Ic\IcSso\IcSso.Client.DotNetFramework\Startup.vb(5,9): warning BC40056: Namespace or type specified in the Imports 'Microsoft.Owin.Security.Cookies' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
  1&gt;D:\Develop\Projects\_Ic\IcSso\IcSso.Client.DotNetFramework\Startup.vb(60,49): error BC30002: Type 'CookieApplyRedirectContext' is not defined.
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  <p>Here's my packages...</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;packages&gt;
    &lt;package id=&quot;Microsoft.AspNet.Mvc&quot; version=&quot;5.2.7&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.AspNet.Razor&quot; version=&quot;3.2.7&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.AspNet.WebPages&quot; version=&quot;3.2.7&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.AspNetCore.Cryptography.Internal&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.AspNetCore.DataProtection&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.AspNetCore.DataProtection.Abstractions&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.AspNetCore.DataProtection.Extensions&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.AspNetCore.Hosting.Abstractions&quot; version=&quot;2.2.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.AspNetCore.Hosting.Server.Abstractions&quot; version=&quot;2.2.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.AspNetCore.Http.Abstractions&quot; version=&quot;2.2.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.AspNetCore.Http.Features&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Bcl.AsyncInterfaces&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Extensions.Configuration.Abstractions&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Extensions.DependencyInjection&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Extensions.DependencyInjection.Abstractions&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Extensions.FileProviders.Abstractions&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Extensions.Hosting.Abstractions&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Extensions.Logging.Abstractions&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Extensions.Options&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Extensions.Primitives&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Owin&quot; version=&quot;4.1.1&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Owin.Security&quot; version=&quot;4.1.1&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Owin.Security.Cookies&quot; version=&quot;4.1.1&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Owin.Security.Interop&quot; version=&quot;2.1.2&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Web.Infrastructure&quot; version=&quot;1.0.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Microsoft.Win32.Registry&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Newtonsoft.Json&quot; version=&quot;12.0.3&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;Owin&quot; version=&quot;1.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Buffers&quot; version=&quot;4.5.1&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.ComponentModel.Annotations&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.IO.Pipelines&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Memory&quot; version=&quot;4.5.4&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Numerics.Vectors&quot; version=&quot;4.5.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Runtime.CompilerServices.Unsafe&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Runtime.InteropServices.RuntimeInformation&quot; version=&quot;4.3.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Security.AccessControl&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Security.Cryptography.Xml&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Security.Permissions&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Security.Principal.Windows&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Text.Encodings.Web&quot; version=&quot;5.0.0&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.Threading.Tasks.Extensions&quot; version=&quot;4.5.4&quot; targetFramework=&quot;net48&quot; /&gt;
    &lt;package id=&quot;System.ValueTuple&quot; version=&quot;4.5.0&quot; targetFramework=&quot;net48&quot; /&gt;
  &lt;/packages&gt;
  </code></pre>
  <p>Any idea why I get all these errors after updating Nuget? Does Owin have problems with the other .Net 5 packages?</p>
  <p>I've tried clearing bin and obj folder - that did not help.</p>