21

When load my .NET Frameowrk 4.6.2 solution in Visual Studio 2017, it gives me the following warning:

Severity Code Description Project File Line Suppression State
Warning Your project is not referencing the ".NETFramework,Version=v4.6.2" framework. Add a reference to ".NETFramework,Version=v4.6.2" in the "frameworks" section of your project.json, and then re-run NuGet restore.

Another:

Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled.   BigData     1   Active

However, loading in visual studio 2015 is totally fine with the exactly same solution files and structures.

Why is this and how I can solve it?

BTW, from what I read, in the latest updates, project.json is merged back to .csproj, why here it's still recommending something on project.json

foxwendy
  • 2,819
  • 2
  • 28
  • 50
  • Sounds like a .NETCore project, there was a rather major change in how these kind of projects are done in VS2017. Recreating the project would be the simple way to avoid relying on the project converter. We shouldn't have to guess at this btw. – Hans Passant Apr 06 '17 at 07:04

2 Answers2

56

I had this show up as an error when building shortly after migrating a solution from vs2015 to 2017, and then also doing some git restructuring. As it turns out, I think git was actually the culprit.

Regardless, manually deleting the bin & obj folders in the affected projects solved it for me. (Clean alone wasn't cutting it.)

Tom
  • 796
  • 7
  • 7
  • 1
    I had a test project and it refused to build. Following this procedure worked like a charm. – CokoBWare Oct 16 '17 at 15:52
  • Man, you are my hero! Btw, a reference to clean up those folders quickly to save everyone else who has the same problem a search: https://stackoverflow.com/questions/755382/i-want-to-delete-all-bin-and-obj-folders-to-force-all-projects-to-rebuild-everyt – Thuan Jul 26 '18 at 03:31
  • Same issue experienced when upgrading to VS2019; and same fix works. – MonkeyProof Solutions Feb 09 '21 at 19:41
0

Are you sure, you installed all needed packages for your project? It could be a not installed feature. Go in the launcher to modify and check, are there all dependencies installed?

Lord_Curdin
  • 957
  • 1
  • 14
  • 27