NuGet / Home

Repo for NuGet Client issues
Other
1.5k stars 252 forks source link

NuGet.PackageManagement 3.5.0-rc1-final supports: net45 (.NETFramework,Version=v4.5) #3370

Closed ThinkAboutGitHub closed 8 years ago

ThinkAboutGitHub commented 8 years ago

I was informed that the Nuget packages version 3.5 would work with .Net Core. Unless I misinterpreted this. So I tried to install NuGet.Packagemanagement to my .net core app, I got an error on restore

log : Restore failed in 2011ms. Errors in C:\Workspace\Genesis\samples.Net Core Nuget Samples\NuGetSamples\src\NuGetSamples\NuGetSamples.xproj Package NuGet.PackageManagement 3.5.0-rc1-final is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package NuGet.PackageManagement 3.5.0-rc1-final supports: net45 (.NETFramework,Version=v4.5) One or more packages are incompatible with .NETCoreApp,Version=v1.0.

So does this version not actually work ?

emgarten commented 8 years ago

NuGet.PackageManagement does not support .NETCoreApp. NuGet.Commandline.XPlat and NuGet.Commands are the top level libraries supporting .NETCoreApp, take a look at those.

NuGet.PackageManagement is currently not used in any cross platform scenarios where .NETCoreApp is required. It also has dependencies on non-.NETCoreApp dependencies such as XDT which are external to NuGet.

ThinkAboutGitHub commented 8 years ago

I just tried installing the two packages mentioned. NuGet.Commandline.XPlat and NuGet.Commands. However apparently one of the dependant packages requires the full framework?

error: Package Newtonsoft.Json 6.0.4 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Newtonsoft.Json 6.0.4 supports: error: - net20 (.NETFramework,Version=v2.0) error: - net35 (.NETFramework,Version=v3.5) error: - net40 (.NETFramework,Version=v4.0) error: - net45 (.NETFramework,Version=v4.5) error: - netcore45 (.NETCore,Version=v4.5) error: - portable-net40+sl5+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile328) error: - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259) error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. log : Writing lock file to disk. Path: C:\Workspace\Genesis\samples.Net Core Nuget Samples\NuGetSamples\src\NuGetSamples\project.lock.json log : C:\Workspace\Genesis\samples.Net Core Nuget Samples\NuGetSamples\src\NuGetSamples\NuGetSamples.xproj log : Restore failed in 39197ms. Errors in C:\Workspace\Genesis\samples.Net Core Nuget Samples\NuGetSamples\src\NuGetSamples\NuGetSamples.xproj Package Newtonsoft.Json 6.0.4 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Newtonsoft.Json 6.0.4 supports:

emgarten commented 8 years ago

@ThinkAboutGitHub you need to add imports to allow other frameworks or add a dependency to Newtonsoft.Json 9.0.1 which has netstandard support.