You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While converting an Aspire project to use a single-file AppHost.cs, I ran into an issue. Previously my testing project had a ProjectReference to ../AspireOrchestration/AspireOrchestration.csproj and that .csproj project was where my AppHost.cs file lived. (The testing project did a simple smoke test that launched the AppHost and ensured that all three of its resources, backend, frontend, and db, reported themselves healthy).
Once I converted AppHost.cs to a single-project file using #:sdk [email protected] and #:package [email protected] and so on, the ProjectReference in my testing project failed, and I could no longer run the following line:
because Projects.AspireOrchestration was no longer found. (I had not moved the location of AppHost.cs, so it was still in the AspireOrchestration folder, but it no longer had a .csproj file).
Is there a syntax (either existing or planned for a future .NET release) for ProjectReferences to a file-based app? Or is the only answer to bring back the .csproj file if you want to have a ProjectReference to it?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
While converting an Aspire project to use a single-file AppHost.cs, I ran into an issue. Previously my testing project had a ProjectReference to
../AspireOrchestration/AspireOrchestration.csprojand that .csproj project was where my AppHost.cs file lived. (The testing project did a simple smoke test that launched the AppHost and ensured that all three of its resources, backend, frontend, and db, reported themselves healthy).Once I converted AppHost.cs to a single-project file using
#:sdk [email protected]and#:package [email protected]and so on, the ProjectReference in my testing project failed, and I could no longer run the following line:because Projects.AspireOrchestration was no longer found. (I had not moved the location of AppHost.cs, so it was still in the AspireOrchestration folder, but it no longer had a .csproj file).
Is there a syntax (either existing or planned for a future .NET release) for ProjectReferences to a file-based app? Or is the only answer to bring back the .csproj file if you want to have a ProjectReference to it?
Beta Was this translation helpful? Give feedback.
All reactions