Package is not compatible with net452, but supports net45
See original GitHub issueSteps to reproduce
Added AutoMapper 5.0.2
package to my project. The restore fails with the error AutoMapper 5.0.2 is not compatible with net452
.
Expected behavior
It should restore. I understand net45 === net452
.
Actual behavior
Errors in C:\Source\MyWebApi\project.json
Package AutoMapper 5.0.2 is not compatible with net452 (.NETFramework,Version=v4.5.2). Package AutoMapper 5.0.2 supports:
- net45 (.NETFramework,Version=v4.5)
- netstandard1.1 (.NETStandard,Version=v1.1)
- netstandard1.3 (.NETStandard,Version=v1.3)
One or more packages are incompatible with .NETFramework,Version=v4.5.2.
NuGet Config files used:
C:\Users\Dennis\AppData\Roaming\NuGet\NuGet.Config
C:\ProgramData\nuget\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-preview2-003121)
Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Steps taken
- Ensure that
nuget.exe
was updated to 3.5.* - Repaired VS2015 and .NET Core SDK
- Removed any other
nuget.config
for the project as identified in the outputdotnet restore --verbosity debug
- Checked https://docs.microsoft.com/en-us/dotnet/articles/core/windows-prerequisites#issues
Frustratingly, it restores and builds on the hosted VSTS agent and on another laptop. It is something wrong with local installation, however can’t determine the cause.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (3 by maintainers)
Top Results From Across the Web
nuget - Could not install package '--'. You are trying to ...
Your package targets NETFramework,Version=v4.5.2. That means the assembly folder is lib\net452. You are trying to install the package to a ...
Read more >Target Frameworks Reference for NuGet
Profile # Frameworks Full name
Profile2.NETFramework 4.0 portable‑net40+win8+sl4+wp7
Profile3.NETFramework 4.0 portable‑net40+sl4
Profile4.NETFramework 4.5 portable‑net45+sl4+win8+wp7
Read more >Target frameworks in SDK-style projects - .NET
The following table shows the target frameworks supported by the .NET SDK and the NuGet client. Equivalents are shown within brackets.
Read more >Fixing issue related to Package is not compatible with ...
Fixing issue related to Package is not compatible with netcoreapp2.1, supports netstandard2.0, when using Azure DevOps (VSTS).
Read more >Package NSG_DPI 1.0.32 is not compatible with net6.0- ...
I received a message on my project that it was using windows- legacy compatibility and that I needed to convert it to windows....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FIXED!
nuget.exe locals -clear all
Thanks to the help of Yishai Galatzer, https://twitter.com/yigalatz/status/761260527599353860
Experiencing similar issue over here. Unity.Practices should be compatible with .net 4.6.2 right? Suddenly it is not. Weird.