Skip to content

Running a .NET project using AddProject with the csproj path fails if the project has not been previously built #2154

@asimmon

Description

@asimmon

I'm really glad that Preview 2 of Aspire added the AddProject overload so we can reference a .NET project by providing an arbitrary project path. However, I feel like Aspire currently assumes that this project is part of (and referenced by) the app host solution, which would result in the project being built before being orchestrated by Aspire. If my project is not part of the app host solution and it has not been compiled yet, Aspire will fail to run it as it uses --no-build when preparing the projects.

In my opinion, this process somewhat defeats the purpose of using AddProject with a custom path because if my project is already part of my solution, I would simply use AddProject<> with the generated service metadata.

Is there any plan to consider building the .NET project prior to running it when using AddProject with a custom path? I believe this overload would be beneficial for scenarios where developers deal with multiple solutions in a monorepo (or even multiple repos).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions