I'm compiling an application that targets the dnxcore50 only.
I'm attempting to reference a nuget package that I know works fine when run against dnx451. When I do dnx . run
I get:
System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'DNXCore,Version=v5.0':
it also suggests a dnu restore
but the package is there
It does not work for this package clearly so under what circumstances will it (if any) ?
In order for it to work must the package manager build a version compiled against dnxcore50?
this chart makes things a bit clearer (copied from here)
No. dnxcore50
indicates you're running on DNX on top of .NET Core. The only assemblies you can load in .NET Core are those that target a compatible profile, in this case e.g. dnxcore50
, dotnet
, or one of the compatible portable profiles.
If you have an assembly compiled against the full .NET Framework (via net45
, net451
, etc.), it won't run when on .NET Core as the same APIs aren't available.