c# - Using Microsoft.AspNetCore.Mvc in .NetStandard 1.4 or below class library -


i have requirement create .netstandard library should support .net core , .netframework 4.5.2. , must have use microsoft.aspnetcore.mvc in both targets(.net core app , .netframework 4.5.2)

but microsoft.aspnetcore.mvc supported on .netstandard 1.6 on wards , .netframework 4.5.1.

i can build .netstandard 1.6 calss library consume in .net 4.5.2. (this not working below problem)

i cannot consume .netstandard 1.6 .netframework 4.5.2. (i getting below exception during run not load file or assembly 'system.runtime, version=4.1.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' or 1 of dependencies. system cannot find file specified)

same question posted on github no solutions yet.(https://github.com/aspnet/mvc/issues/6028#issuecomment-289606346)

thanks in advance.

you can find matrix of versions of .net standard supported framework here:

https://docs.microsoft.com/en-us/dotnet/articles/standard/library

so no, .net standard 1.6 not supported 4.5.2.

essentially stuff still in development, , until .net standard 2.0 here you'll continue run these kinds of issues.

the way around build 2 libs same source code, 1 targeting netcoreapp or .net standard, other targeting full framework. have 2 vcproj files, single set of code. not ideal, best can right now.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -