Add generated projects to solution does not work for `.slnx`. (D396686C-DE0E-4DE6-906D-291CD29FC5DE)
- Dominant language
- No language data
- Stars
- 1.7k
- Forks
- 399
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 39
Description
### 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:
```json
"postActions": [
{
"description": "Add the project to the solution.",
"manualInstructions": [
{
"text": "Add generated projects to solution."
}
],
"actionId": "D396686C-DE0E-4DE6-906D-291CD29FC5DE",
"continueOnError": false
},
```
3. 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_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.