Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet sln add not consistently discovering Project Type Guids for unknown project types #47638

Open
baronfel opened this issue Mar 15, 2025 · 0 comments
Labels
Area-CLI cli-ux Issues and PRs that deal with the UX of the CLI (exit codes, log output, verbs/options, and so on)

Comments

@baronfel
Copy link
Member

Describe the bug

When adding projects to an slnx that use project extensions that are unknown to the vs-solutionpersistence library, we are not correctly discovering the DefaultProjectTypeGuid MSBuild property and applying that to the SolutionProjectModel's Type correctly.

To Reproduce

  • clone https://github.com/ikvmnet/ikvm-maven
  • rename src/IKVM.Maven.Sdk.Tasks.Java/IKVM.Maven.Sdk.Tasks.Java.csproj to src/IKVM.Maven.Sdk.Tasks.Java/IKVM.Maven.Sdk.Tasks.Java.msbuildproj
  • convert the solution to slnx with dotnet sln migrate
  • inspect the generated slnx and note there is a Type for the IKVM.Maven.Sdk.Tasks.Java project
  • remove the project with dotnet sln remove src/IKVM.Maven.Sdk.Tasks.Java/IKVM.Maven.Sdk.Tasks.Java.msbuildproj
  • add the project with dotnet sln add src/IKVM.Maven.Sdk.Tasks.Java/IKVM.Maven.Sdk.Tasks.Java.msbuildproj
  • inspect the generated slnx and note there is no Type for the IKVM.Maven.Sdk.Tasks.Java project

Exceptions (if any)

during dotnet sln add, the following message is thrown:

Project 'D:\ikvm-maven\src\IKVM.Maven.Sdk.Tasks.Java\IKVM.Maven.Sdk.Tasks.Java.msbuildproj' has an unknown project type and cannot be added to the solution file. Contact your SDK provider for support.

Further technical details

  • Include the output of dotnet --info: 9.0.2xx
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-CLI untriaged Request triage from a team member labels Mar 15, 2025
@baronfel baronfel added cli-ux Issues and PRs that deal with the UX of the CLI (exit codes, log output, verbs/options, and so on) and removed untriaged Request triage from a team member labels Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CLI cli-ux Issues and PRs that deal with the UX of the CLI (exit codes, log output, verbs/options, and so on)
Projects
None yet
Development

No branches or pull requests

1 participant