Mardoxx Mardoxx - 6 months ago 83
C# Question

Load in netstandard2.0 libraries to net461 project

A quick google says this is possible, but I can't find out how?

I want to play around with SignalR-Core and service fabric. The latest

Microsoft.AspNetCore.SignalR
package is
1.0.0-alpha1-26359
and targets
netstandard2.0


The current version of ServiceFabric's libraries
5.6.220
(
2.6.220
for the other libraries) target
net45
(I think?.. Anyone know how to quickly check what frameworks a nuget package targets?). From what I'm aware
net45
libraries can run on any framework
>= net45
so that shouldn't be a problem.

My service fabric application project targets
net461
and I'm running VS2017 with whatever the latest update is as of today.

When I try and install the package with
install-package Microsoft.AspNetCore.SignalR -pre
it says
install-package : Package Microsoft.AspNetCore.SignalR 1.0.0-alpha1-26359 is not compatible with net461 (.NETFramework,Version=v4.6.1). Package Microsoft.AspNetCore.SignalR 1.0.0-alpha1-26359 supports: netstandard2.0 (.NETStandard,Version=v2.0)


What am I missing here? Is there some csproj trickery I have to do that the powershell script/VS2017 isn't aware of yet? Will this only be a feature when .NET Core 2.0 is released proper?

Answer Source

Using VS2017-Update3 (Preview) made this work fine.

VS2017 15.3 includes support for this.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download