Skip to content

Add generated projects to solution does not work for .slnx. (D396686C-DE0E-4DE6-906D-291CD29FC5DE) #8906

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

Open
rynowak opened this issue Apr 7, 2025 · 0 comments

Comments

@rynowak
Copy link
Member

rynowak commented Apr 7, 2025

Product

dotnet CLI (dotnet new)

Describe The Bug

The "add project to solution" post-action seems to ignore .slnx files.

I have a template that was working before we migrated. Now it fails with:

Processing post-creation actions...
Unable to determine which solution file to add the reference to.
Post action failed.
Manual instructions: Add generated projects to solution.

To Reproduce

Steps:

  1. Create a .NET new template that creates a project.
  2. Use the following post-action:
"postActions": [
    {
      "description": "Add the project to the solution.",
      "manualInstructions": [
        {
          "text": "Add generated projects to solution."
        }
      ],
      "actionId": "D396686C-DE0E-4DE6-906D-291CD29FC5DE",
      "continueOnError": false
    },
  1. Run this in a directory with an existing .slnx file (and no .sln file).

dotnet Info

output  dotnet --info .NET SDK: Version: 9.0.201 Commit: 071aaccdc2 Workload version: 9.0.200-manifests.21502d11 MSBuild version: 17.13.13+1c2026462

Runtime Environment:
OS Name: Mac OS X
OS Version: 15.4
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/9.0.201/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.3
Architecture: arm64
Commit: 831d23e561

.NET SDKs installed:
9.0.102 [/usr/local/share/dotnet/sdk]
9.0.200 [/usr/local/share/dotnet/sdk]
9.0.201 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
/Users/ryan/github.com/infinity-microsoft/picasso/global.json

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Version

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant