Skip to content
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

[Issue] azd up fails on todo-csharp-cosmos-sql #1421

Closed
timheuer opened this issue Jan 19, 2023 · 9 comments
Closed

[Issue] azd up fails on todo-csharp-cosmos-sql #1421

timheuer opened this issue Jan 19, 2023 · 9 comments
Assignees
Labels
blocker bug Something isn't working templates

Comments

@timheuer
Copy link
Contributor

Describe the bug
WHen performing azd up on the csharp cosmos sql template it fails with:

2023/01/19 13:55:26 command_runner.go:79: Run exec: 'dotnet publish D:\source\repos\todo-csharp\src\api -c Release --output C:\Users\timheuer\AppData\Local\Temp\azd3394537926'
  (✓) Done: Deploying service api

ERROR: deploying service: packaging service api: dotnet publish on project 'D:\source\repos\todo-csharp\src\api' failed: exit code: 1, stdout: MSBuild version 17.5.0-preview-22620-02+a6f6699d1 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\7.0.200-preview.22628.1\Current\SolutionFile\ImportAfter\Microsoft.NET.Sdk.Solution.targets(36,5): error NETSDK1194: The "--output" option isn't supported when building a solution. [D:\source\repos\todo-csharp\src\api\Todo.Api.sln]
, stderr: : exit status 1

This is calling dotnet publish on a directory that has both a SLN and csproj and will give preference to SLN if a proj is not specified. --output isn't supported there.

@ghost ghost added the needs-triage For new issues label Jan 19, 2023
@jongio
Copy link
Member

jongio commented Jan 19, 2023

@rajeshkamal5050 could you have a look?

@rajeshkamal5050
Copy link
Contributor

@hemarina can you triage this and please do check with @timheuer on his setup/dependencies?

@rajeshkamal5050 rajeshkamal5050 added templates bug Something isn't working labels Jan 19, 2023
@ghost ghost removed the needs-triage For new issues label Jan 19, 2023
@hemarina
Copy link
Contributor

hemarina commented Jan 20, 2023

todo-csharp-cosmos-sql template in the main branch is working well. I think this error is caused by a breaking change on publish command from the dotnet SDK side where it doesn't support using --output when read slu file.

Related issue on dotnet sdk - Error, warn, or fix behavior when specifying output path when building a solution
Related PR on dotnet sdk: Add error when specifying --output option for a solution

@timheuer Could you check if this works with previous versions of dotnet runtime/sdk?

@timheuer
Copy link
Contributor Author

timheuer commented Jan 20, 2023

Correct: dotnet/sdk#15607 -- will azd be updated for templates to point to the proj file?

@rajeshkamal5050 rajeshkamal5050 added this to the On Deck milestone Jan 20, 2023
@rajeshkamal5050
Copy link
Contributor

Yes, we should be updating templates. Provided the recommended fix is backward compatible and works with previous dotnet runtime/sdks.

@baronfel
Copy link
Member

I can confirm that explicitly specifying the project file (not just the containing directory) works in previous dotnet SDKs.

@rajeshkamal5050
Copy link
Contributor

@hemarina we should probably get this fixed definitely for our Apr release.

@rajeshkamal5050
Copy link
Contributor

Marking this as blocker for 0.8 April 5th release. If not needed, please clarify and remove blocker.

@savannahostrowski @ellismg

@rajeshkamal5050
Copy link
Contributor

Closed as part of #1779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Something isn't working templates
Projects
None yet
Development

No branches or pull requests

5 participants