microsoft / microsoft/aspire

[Preview] .NET Aspire - Incorrect configuration when "Place project and solution in same folder" was used

Open
#983 7 comments 0 reactions 0 assignees View on GitHub
area-templates
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

Visual Studio interprets the solution like this:

![image](https://github.com/dotnet/aspnetcore/assets/9629574/022b9033-e97e-4e2d-92c7-40bc6f8f0086)

So the newly added files are both inside their new project, and the selected

![image](https://github.com/dotnet/aspnetcore/assets/9629574/5385ecfd-3d78-4aeb-a6cc-87dfcf3192bc)

### Expected Behavior

- Perhaps show an error message
- Or convert the project to a subfolder structure

### Steps To Reproduce

- Create new ASP.NET Core application
- Choose to put the project/solution in the same folder
- Add Aspire

### Exceptions (if any)

![image](https://github.com/dotnet/aspnetcore/assets/9629574/c6950818-7c27-439c-8433-c131ed1ab0b8)

> CS0121
> The call is ambiguous between the following methods or properties:
> 'Microsoft.Extensions.Hosting.Extensions.AddServiceDefaults(Microsoft.Extensions.Hosting.IHostApplicationBuilder)' and
> 'Microsoft.Extensions.Hosting.Extensions.AddServiceDefaults(Microsoft.Extensions.Hosting.IHostApplicationBuilder)'

### .NET Version

8.0

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.