Closed ghost closed 6 years ago
@Eilon @DamianEdwards @davidfowl
@Jacquers if you look at Help -> About in your visual studio installation, what version of Nuget are you running:
Here's mine.
I have 4.4.1.4633
I'm hoping that an update to VS will solve the issue, but the weird thing is that a coworker has an older version of VS than me and he doesn't have the issue.
Is your coworker using the same version of visual studio as you (and nuget?)?
Can you do me a favor and look at:
%userprofile%\.nuget\packages\microsoft.aspnetcore.authentication.abstractions\2.0.1\
And open up the nuspec and paste it in here.
Also if you downgrade to 2.0.0 does it start working again?
My coworker is using a lower version of VS20107 (and nuget).
If I downgrade to .Net Core 2.0.0 Visual Studio does not pick it up in the list of available frameworks.
I don't have that folder user my userprofile folder. I use a program called Everything to find files / folders.
I do have have it in other places:
C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.authentication.abstractions
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Microsoft.AspNetCore.Authentication.Abstractions</id>
<version>2.0.1</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>https://raw.githubusercontent.com/aspnet/Home/2.0.0/LICENSE.txt</licenseUrl>
<projectUrl>https://asp.net/</projectUrl>
<iconUrl>https://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
<description>ASP.NET Core common types used by the various authentication components.</description>
<copyright>Copyright © Microsoft Corporation</copyright>
<tags>aspnetcore authentication security</tags>
<serviceable>true</serviceable>
<repository type="git" url="https://github.com/aspnet/HttpAbstractions" />
<dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="Microsoft.AspNetCore.Http.Abstractions" version="2.0.1" />
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="2.0.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.Options" version="2.0.0" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
</package>
C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.authentication.abstractions
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Microsoft.AspNetCore.Authentication.Abstractions</id>
<version>2.0.1</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>https://raw.githubusercontent.com/aspnet/Home/2.0.0/LICENSE.txt</licenseUrl>
<projectUrl>https://asp.net/</projectUrl>
<iconUrl>https://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
<description>ASP.NET Core common types used by the various authentication components.</description>
<copyright>Copyright © Microsoft Corporation</copyright>
<tags>aspnetcore authentication security</tags>
<serviceable>true</serviceable>
<repository type="git" url="https://github.com/aspnet/HttpAbstractions" />
<dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="Microsoft.AspNetCore.Http.Abstractions" version="2.0.1" />
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="2.0.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.Options" version="2.0.0" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
</package>
C:\Program Files\dotnet\store\x64\netcoreapp2.0\microsoft.aspnetcore.authentication.abstractions
No nuspec here.
Thanks for you help, I do appreciate it.
If I downgrade to .Net Core 2.0.0 Visual Studio does not pick it up in the list of available frameworks.
Can you show your project file?
Here you go. I've tried a couple of different things like changing the 2.0.1 to 2.0.0, etc, but in the end all that worked was changing Microsoft.AspNetCore.All back to 2.0.0
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="automapper" Version="6.2.1" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="3.2.0" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="NETStandard.Library" Version="2.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
<PackageReference Include="VSc.Utils.Audit.Providers" Version="1.0.4" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VSc.DSO.Logic\VSc.DSO.Logic.csproj" />
<ProjectReference Include="..\VSc.DSO.Repository.Integration\VSc.DSO.Repository.Integration.csproj" />
<ProjectReference Include="..\VSc.DSO.Repository.Models\VSc.DSO.Repository.Models.csproj" />
<ProjectReference Include="..\VSc.DSO.Repository\VSc.DSO.Repository.csproj" />
</ItemGroup>
</Project>
@davidfowl @muratg can we get someone to take a look and give suggestions on what may be wrong?
@Jacquers I don't think you should need/have the reference to NETStandard.Library. That should be brought in for you at the right version if any of your dependencies are .NET Standard libraries. I don't think that will fix this issue but it would get things more consistent with how a project should look and remove a level of NuGet complexity from your package graph.
@Jacquers does dotnet restore
from command line work for you? I tried restoring your project file and it seems to restore 2.0.3 .All metapackage just fine. (except for the project-to-project dependencies one the Vsc...
package which I assume one your of packages.)
dotnet restore from the package manager console didn't solve the issue.
I updates VS2017 this morning to 15.5.1 (with Package Manager Console Host Version 4.5.0.4685)
Updated to 2.0.3 and it restored and built successfully :)
I am getting exactly the same issue while trying to build the docker image.
@barongnt do you hit this issue with 2.0.3 and higher or are you trying 2.0.1?
Target must be set to netcoreapp
instead of netcorestandard
.
Has anyone gotten to the bottom of this one?
I believe this was mostly user error, and should be good to close. Folks can file other bugs if they're seeing issues.
@Petermarcu agree?
Sounds good. If there are issues related to this, lets open up new bugs with all the details for that issue.
I just found this thread via Google search. I have VS 2017, version 15.7.3. NuGet is version 4.6.0. If I create a new ASP.Net Core app (either an API or a Web App), the template gives me Microsoft.AspNetCore.All v2.0.8. In either project, on either of two computers (with identical VS versions), when I ask NuGet to upgrade Microsoft.AspNetCore.All to 2.1.0, it says:
Package restore failed. Rolling back package changes for 'MyProject'. Package Microsoft.AspNetCore.All 2.1.0 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.All 2.1.0 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)
It will probably be fixed with the next VS update.
installing vs 15.7.5 fixed my problem
upgrading to vs 15.7.5 fixed my problem as well
Hi, I have similar issue. VS version: 15.7.5 NuGet version: 4.6.0
After creating brand new .NetCore 2 API project, I cannot build it. The error is: NU1202 Package Newtonsoft.Json 10.0.1 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Newtonsoft.Json 10.0.1 does not support any target frameworks.
I have tried restoring packages, even reinstalling Visual Studio, but did not get any results.
The biggest problem is that I got this error on my application. My app consists of several projects. One of them is .NetCore 2 Api. The other is Winforms client. Everything worked fine, but suddenly I wasn't able to connect with my client to WebApi (server was closing the connection). After a little digging, I found out that there is a problem with... Newtonsoft.Json 10.0.1.... on server side.
So now, nothing works. Even if I try to create brand new solution with just one default project.
This is very urgent, as I asm suppose to present my application to the client. And I can't...
Hello everyone, have the similar issue with Package Polly 6.0.1 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Polly 6.0.1 does not support any target frameworks. VS: 15.7.6 NuGet: 4.6.0 dotnet: .NET Core SDK (reflecting any global.json): Version: 2.1.302 Commit: 9048955601
Runtime Environment: OS Name: Windows OS Version: 10.0.15063 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.302\
Host (useful for support): Version: 2.1.2 Commit: 811c3ce6c0
.NET Core SDKs installed: 2.1.302 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
@AdamJachocki / @onahirniak, could you guys file a new bug with the details? This particular issue was resolved and closed so it's not getting a lot of attention from the team.
Thanks.
I am also getting the same error . Is this issue still open. Please help
For me the solution was to... reinstall system :-/
Updating the VS to 15.7.6 solved the issue
I've been having the same issue. My project used to build without any problems. I had unrelated issues and did a system restore which interfered with my VS installation. I re-installed Visual Studio and have been unable to build my project ever since.
This has been really frustrating. I've re-installed visual studio, .net core, and all .net related programs countless of times. Nothing seems to resolve the issue.
Error Message for essentially any package: NU1202 - Package .. is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package .. does not support any target frameworks.
VS Community 2017: 15.8.3 NuGet: 4.6.0 dotnet: .NET Core SDK: 2.1.401
OS: Windows 10 Home
Hi, I have the same problem as justinr646 above. It also started when I did a system restore. I did try to revert a system restore, but to no avail.
When I open Visual Studio I see the problem that Microsoft.VisualStudio.ServiceModel did not load correctly. This is the log from ActivityLog.xml:
<entry>
<record>653</record>
<time>2018/09/16 19:15:31.186</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [Microsoft.VisualStudio.ServiceModel.VisualStudioPackage, Microsoft.VisualStudio.ServiceModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]</description>
<guid>{2C0F61BF-3C36-468C-94B8-4021965749E7}</guid>
</entry>
<entry>
<record>654</record>
<time>2018/09/16 19:15:31.195</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [Microsoft.VisualStudio.ServiceModel.VisualStudioPackage, Microsoft.VisualStudio.ServiceModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.ServiceModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.ServiceModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.ServiceModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
 at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
 at System.Activator.CreateInstance(String assemblyName, String typeName)
 at System.AppDomain.CreateInstance(String assemblyName, String typeName)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
</description>
<guid>{2C0F61BF-3C36-468C-94B8-4021965749E7}</guid>
<hr>80004005 - E_FAIL</hr>
<errorinfo></errorinfo>
</entry>
Also when I build the project I see this in output window:
The library 'hostpolicy.dll' required to execute the application was not found in <path>
Could this have to do something with the package restore issue?
Still having this issue with ASP.Net Core 2.1.5 and NetStandard 2.0.
Error NU1201 Project EMS.Service is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Project EMS.Service supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1) EMS.UIService C:\Projects\EMS2\EMS\EMS.UIService\EMS.UIService.csproj
Please someone can help in solving this issue? reference: https://github.com/ianbusko/reusable-components-library
Regards
Make sure you have the latest Visual Studio version / update, it usually solves the issue.
@wgutierrezr it seems you're trying to use .NET Core project as .NET Standard project. That is not going to work. .NET Core can depend on .NET Standard, but not the other way around.
Am using visual studio 2017 (v15.8.7) I download azure web job sdk(https://github.com/Azure/azure-webjobs-sdk) src code and tried to build I am getting this error
Severity Code Description Project File Line Suppression State Error NU1202 Package System.Text.Encoding 4.3.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package System.Text.Encoding 4.3.0 supports:
Here are my installed dotnet core sdk details
Looks like different problem than the one originally reported here.
I don't think you need the package - its content is part of the platform (System.Runtime) in .NET Core 2.0+: https://apisof.net/catalog/System.Text.Encoding Just don't include it and it should be fine.
@karelz I cloned the repo from GitHub and just built it. that's an official Azure SDK. I didn't add/modify anything. Please let me know if I should open a new issue.
Running into this same issue VS2017 15.9.13, NuGet Package Manager 4.6.0, NuGet 4.9.3.5777. I had other errors (loosely, more like MSBuild ignored errors), but nothing like this. Now that I have published my CLI tools, which MSBuild targets want to download, in spite of my providing internal paths to the build pipeline assets, now receiving half a dozen or so of these incompatible package errors. It's a major block in my continued build pipeline.
System.Reflection.Metadata ... netcoreapp2.1
System.Collections.Immutable ... netcoreapp2.1
Microsoft.CodeAnalysis.CSharp ... netcoreapp2.1
Microsoft.CodeAnalysis.Common ... netcoreapp2.1
Nuget seems to pull in versions from a higher version of .net core that causes these compatibility issues. Maybe specifying the version you need manually / explicitly could help.
I partially identified the issue in this case, I think. It was a typo in the version property I was using to inform the Roslyn packages. So it found blank, and defaulted to the actual project being built's package version, which was obviously incorrect. Will monitor that for further details.
Still having this same error I have attached my log files for your information. XamrianAppEfCore.zip
Severity Code Description Project File Line Suppression State Error NU1202 Package Microsoft.AspNet.Identity.Core 2.0.1 is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x86. Package Microsoft.AspNet.Identity.Core 2.0.1 supports: net45 (.NETFramework,Version=v4.5) FitnessBuddies.iOS D:\GitMaster\AppManager\FitnessBuddies\FitnessBuddies\FitnessBuddies.iOS\FitnessBuddies.iOS.csproj 1
I installed v2.0.3 of the SDK and when trying to create a new .Net Core Web Api project in VS2017 (15.4.4) I get a whole bunch of errors, all coming from Microsoft.AspNetCore.All 2.0.3 and it's dependencies. I've spent almost a day trying to get this to work, but with no resolution. I tried going back to SDK 2.0.0 but then VS does not list it as an available framework.
It's probably a VS2017 issue and I'm hoping that the next update will resolve it, but for now I have to use 2.0.0
The errors are all along the lines of: Package Microsoft.AspNetCore.Authentication.Abstractions 2.0.1 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Authentication.Abstractions 2.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)