Aks_M
Aks_M

Reputation: 179

Visual Studio-2017. These projects are either not supported or need project behavior impacting modifications to open in this version of VS

I created a project in Visual Studio 2017. It worked all fine when I initially created it. The next time when I tried to open the same project it gave an error as shown below enter image description here

I had created that project in Visual studio 2017 itself and the next time as well I tried to open it with visual studio 2017. So doesn't seem to be a version related problem.

Also, I did not make any changes to the project after it worked last time. And when I click "OK", the solution does not load. Below is what in solution explorer. enter image description here

I tried to research this error a bit and came across some links as below as even I am getting the exact same error as mentioned in those links. But those links didn't really help me. I tried to reload the project solution, but that didn't work.

https://social.msdn.microsoft.com/Forums/vstudio/en-US/966fb9d0-5423-4810-b03b-94a5417831a5/these-projects-are-either-not-supported-or-need-project-behavior-impacting-to-open-this-version-of?forum=visualstudiogeneral

https://www.aspforums.net/Threads/120933/Visual-Studio-Error-These-projects-are-either-not-supported-or-need-project-behavior-impacting-to-open-this-version-of-Visual-Studio/

Upvotes: 7

Views: 6411

Answers (3)

Nate Anderson
Nate Anderson

Reputation: 21034

This problem happens because of the XML element inside the .csproj file (if you open as text / edit the csproj file directly)

<ProjectTypeGuids>

See related questions here:

  • The question here is related; the top-voted answer and the accepted answer suggest editing the .csproj file and changing the <ProjectTypeGuids>
    • be careful of changing the csproj; this might only be appropriate if you know what you're doing / using specific Project Type GUID values that are compatible with one another, (see details in the answers above, which seem specific to ASP.NET MVC 2)
  • The question here, which shows how to install the correct tooling depending on your project type (the question is here specific to ASP.NET MVC 5 and C#)

Upvotes: 0

Uzair
Uzair

Reputation: 775

I got the same error after trying other methods this methods works like a charm for me.

  1. open Visual Studio Installer.
  2. click on modify.
  3. check Game Development With Unity.

install it and here you go.

enter image description here

Upvotes: 1

Aks_M
Aks_M

Reputation: 179

So, just in case anyone is interested to know, finally what worked for me is,

  1. DELETE THE csproj.user FILE that was there in my solution
  2. RELOAD the project

And I got the hint from https://forums.asp.net/t/1491251.aspx?Can+t+load+project+because+root+element+is+missing+

Thank you all those who helped me with my issue. Although I was able to solve my problem, if anyone knows, I would like to know the reason why I got that error and why just deleting the csproj.user file and reloading the project loaded my solution all good.

To add to this, when I created this solution initially and it worked all fine, I then shared it with my team member and that team member opened the project all fine and then shared it back to me without any changes. And then when I tried to open it again, I was unable to open the project.

Upvotes: 5

Related Questions