.net Core 2.0 - Package was restored using .NetFramework 4.6.1 instead of target framework .netCore 2.0. The package may not be fully compatible

后端 未结 3 1675
Happy的楠姐
Happy的楠姐 2020-12-28 11:08

I have a .net core 2.0 console app. I\'m trying to read files from TFS using the following:

How to get a file from TFS directly into memory (i.e., don't want t

相关标签:
3条回答
  • 2020-12-28 11:45

    That particular package does not include assemblies for dotnet core, at least not at present. You may be able to build it for core yourself with a few tweaks to the project file, but I can't say for sure without diving into the source myself.

    0 讨论(0)
  • 2020-12-28 12:05

    For me, I had ~6 different Nuget packages to update and when I selected Microsoft.AspNetCore.All first, I got the referenced error.

    I started at the bottom and updated others first (EF Core, EF Design Tools, etc), then when the only one that was left was Microsoft.AspNetCore.All it worked fine.

    0 讨论(0)
  • 2020-12-28 12:07

    The package is not fully compatible with dotnetcore 2.0 for now.

    eg, for 'Microsoft.AspNet.WebApi.Client' it maybe supported in version (5.2.4). See Consume new Microsoft.AspNet.WebApi.Client.5.2.4 package for details.

    You could try the standard Client package as Federico mentioned.

    If that still not work, then as a workaround you can only create a Console App (.Net Framework) instead of the .net core 2.0 console app.

    Reference this thread: Microsoft.AspNet.WebApi.Client supported in .NET Core or not?

    0 讨论(0)
提交回复
热议问题