Home Can I use a newer System.* assembly without .net standard?
Reply: 0

Can I use a newer System.* assembly without .net standard?

afeygin Published in 2017-12-07 23:05:32Z

We have upgraded one of our Web projects to ASP.NET Core 2.0, and are now getting errors in other projects because of mismatched assembly version. I am trying to upgrade all our conflicting assemblies to the highest version.

For example, the previous version of System.Collections.Immutable nuget package was 1.3.1, but the one that the ASP.NET Core 2 project references is in version 1.4.0. So I try to change this in the .csproj files where System.Collections.Immutable is referenced:

    <PackageReference Include="System.Collections.Immutable" Version="1.4.0" />

However, this causes a compilation error:

The version of Microsoft.NET.Sdk used by this project is insufficient to support references to libraries targeting .NET Standard 1.5 or higher. Please install version 2.0 or higher of the .NET Core SDK.

First of all, I do have .NET Core 2.0 SDK installed. Googling around there was some suggestions that I add a <DependsOnNETStandard> property to the csproj file and reference NETStandard.Library. However, I can't do that because our code makes full use of the .NET Framework, including stuff not in netstandard.

How can I get this to work?

FYI, we are on Visual Studio 15.3.3 and .NET 4.6.2.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.277317 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO