novotnyllc / MSBuildSdkExtras

Extra properties for MSBuild SDK projects
MIT License
348 stars 42 forks source link

Unable to add reference to netstandard through Visual Studio UI #267

Open workgroupengineering opened 3 years ago

workgroupengineering commented 3 years ago

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.