dotnet / dotnet/project-system
xUnit Test Project (.NET Core) use the old project type GUID in the Solution file
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
**Visual Studio Version**: Microsoft Visual Studio Community 2019, Version 16.6.3
**Summary**: When creating a new project of type `xUnit Test Project (.NET Core) C#`, the project is added to the solution with the GUID `FAE04EC0-301F-11D3-BF4B-00C04F79EFBC` (legacy C#) instead of the new GUID [`9A19103F-16F7-4668-BE54-9A1E7A4F7556`](https://github.com/dotnet/project-system/blob/master/docs/opening-with-new-project-system.md#project-type-guids) (SDK-style C#).
**Steps to Reproduce**:
1. Open Visual Studio 2019, Version 16.6.3
2. Create a new project of type `xUnit Test Project (.NET Core) C#` with the name `Project1`
3. Open the solution file (`.sln`) on a text editor and notice that project is identified as being a legacy C# project
**Expected Behavior**:
```
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Project1", "Project1\Project1.csproj", "{9431EF13-2586-440E-B323-1145C81F6672}"
EndProject
```
**Actual Behavior**:
```
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project1", "Project1\Project1.csproj", "{9431EF13-2586-440E-B323-1145C81F6672}"
EndProject
```
**User Impact**:
- Tooling incorrectly identify xUnit projects as being legacy C# projects instead of SDK-style projects
- Visual Studio 2019 has different behavior depending on the project type GUID ([example](https://developercommunity.visualstudio.com/content/problem/474512/when-adding-an-existing-project-to-solution-vs2019.html))
- Visual Studio changes the GUID to `9A19103F-16F7-4668-BE54-9A1E7A4F7556` at a later time (it's not clear exactly when) which creates changes in source control that are not related to the work being done at the time
Contributor guide
Assessment
This issue has not been assessed yet.