novotnyllc / MSBuildSdkExtras

Extra properties for MSBuild SDK projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to add reference to netstandard through Visual Studio UI

workgroupengineering opened this issue · comments

How Reproduce:

  1. Create multi target C# Project like this

    <Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
      <PropertyGroup>
        <TargetFrameworks>netstandard2.1;xamarinmac20;xamarinios10;MonoAndroid11.0;MonoAndroid10.0</TargetFrameworks>
        <LangVersion>latest</LangVersion>
      </PropertyGroup>
    
      <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
        <PackageReference Include="System.Buffers" Version="4.5.1" />
        <PackageReference Include="System.Memory" Version="4.5.4" />
      </ItemGroup>
    
      <ItemGroup>
        <PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.0.0" />    
      </ItemGroup>
    </Project>
  2. Try to add reference to netstandard through Visual Studio UI

I have already posted the issue at https://developercommunity.visualstudio.com/, but they suggest opening it here.