I've installed Visual Studio 2017. I have a class library in the new .NET Standard format, which is able to be used by both .NET Framework and .NET Core. But when I go to Add… Reference… Assemblies Framework, Visual Studio spins for a long time and then says,
No Framework assemblies were found on the machine.
(This machine also has Visual Studio 2015 installed, as well as .NET 4.6.1.)
How do I resolve this?
My .csproj
file currently looks like this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Utility\EncryptionUtility.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Utility\" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Runtime.Caching" />
</ItemGroup>
</Project>
Changing the target framework from:
<TargetFramework>netstandard2.0</TargetFramework>
to
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
Allows me to finally add a reference to System.Runtime.Caching
, but it has a yellow warning icon in the IDE when expanding the references. It is included under both .NET 4.6.1 and .NET Standard in the collapsible sections, with the reference under Standard also shows the warning icon. Builds fail because the IDE claims that the reference is still missing.