.net - Build errors when multi-targeting in csproj file -


i'm trying build class library multi-targets both .net 4.5.1 , .net standard 1.3. according the documentation, should able this:

<propertygroup>   <targetframeworks>net451;netstandard1.3</targetframeworks> </propertygroup> 

however, when try build, these odd errors:

cannot infer targetframeworkidentifier and/or targetframeworkversion targetframework='net451'. must specified explicitly.

msb3645 .net framework v3.5 service pack 1 not found. in order target ".netframework,version=v1.3", .net framework v3.5 service pack 1 or later must installed.

msb3644 reference assemblies framework ".netframework,version=v1.3" not found. resolve this, install sdk or targeting pack framework version or retarget application version of framework have sdk or targeting pack installed. note assemblies resolved global assembly cache (gac) , used in place of reference assemblies. therefore assembly may not correctly targeted framework intend.

if specify target framework identifiers manually, builds fine:

<propertygroup>   <targetframeworks>net451;netstandard1.3</targetframeworks> </propertygroup> <propertygroup condition="'$(targetframework)' == 'net451'">   <targetframeworkidentifier>.netframework</targetframeworkidentifier> </propertygroup> <propertygroup condition="'$(targetframework)' == 'netstandard1.3'">   <targetframeworkidentifier>.netstandard</targetframeworkidentifier> </propertygroup> 

i'm using visual studio 2017 community. doing wrong here?

have written <targetframeworks>net451;netstandard1.3</targetframeworks> , not <targetframework>net451;netstandard1.3</targetframework>?

i getting same error until added missing s


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 -