machinelearning: Installing package Microsoft.ML on target framework .NET Framework 4.6.2 fails.
System information
- OS version/distro: Windows 10
- .NET Version (eg., dotnet --info): .NET 4.6.2
Issue
-
What did you do? Tried to install Nuget Package
Microsoft.MLon a.NET 4.6.2project in Visual Studio 2013 (Version 12.0.40629.00 Update 5) -
What happened? Nuget Package installation failed with error.
-
What did you expect? Nuget Package should have been installed successfully as
netstandard 2.0supports.NET Framework 4.6.2.
Source code / logs
Installing 'Microsoft.ML 0.4.0'.
Successfully installed 'Microsoft.ML 0.4.0'.
Adding 'Microsoft.ML 0.4.0' to XXX.
Uninstalling 'Microsoft.ML 0.4.0'.
Successfully uninstalled 'Microsoft.ML 0.4.0'.
Install failed. Rolling back...
Could not install package 'Microsoft.ML 0.4.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (8 by maintainers)
As the error indicates, you can’t use
Any CPUwith Microsoft.ML. Instead you need to change your project’s platform to eitherx64orx86. See https://docs.microsoft.com/en-us/visualstudio/ide/how-to-configure-projects-to-target-platforms for instructions on how to change it.I have resolved by switching back to Dot Net Framework V4.6 , I wonder if you may find another solution for the duplicate reference issue @eerhardt