dotnet / aspire-samples

MIT License
679 stars 197 forks source link

Error deploying AspireShop to Azure using 'azd up' on Windows 11 #427

Closed ericziko closed 2 months ago

ericziko commented 2 months ago

I pulled down copy of the aspire-samples repo and attempted to deploy to azure using azd init and azd up on my windows 11 machine and got the following error:

Please note: I was able to do the same deployment on my Mac M2 with out error.

Please advise

aspire-samples\samples\AspireShop\AspireShop.AppHost> azd up

Packaging services (azd package)

Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.

Subscription: Azure subscription 1 (e1991798-1e03-4105-b5ab-d8454f2ccc73)
Location: East US

  (-) Skipped: Didn't find new changes.

Deploying services (azd deploy)

  (✓) Done: Deploying service basketcache
  - Endpoint: https://basketcache.internal.redtree-f7652f5c.eastus.azurecontainerapps.io/

  (✓) Done: Deploying service basketservice
  - Endpoint: https://basketservice.internal.redtree-f7652f5c.eastus.azurecontainerapps.io/

  (✓) Done: Deploying service catalog
  - Endpoint: https://catalog.internal.redtree-f7652f5c.eastus.azurecontainerapps.io/

  (x) Failed: Deploying service catalogdbmanager

ERROR: error executing step command 'deploy --all': failed deploying service 'catalogdbmanager': publishing container: dotnet publish on project 'C:\Users\Ericz\gitHub\dotnet\aspire-samples-2\samples\AspireShop\AspireShop.CatalogDbManager\AspireShop.CatalogDbManager.csproj' failed: exit code: 1, stdout: , stderr: MSBUILD : error MSB4166: Child node "2" exited prematurely. Shutting down. Diagnostic information may be found in files in "C:\Users\Ericz\AppData\Local\Temp\MSBuildTemp\" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.
MSBUILD : error MSB4166: C:\Users\Ericz\AppData\Local\Temp\MSBuildTemp\MSBuild_pid-20892_99e7bb86d13e47b586e03cd080b42056.failure.txt:
MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 20892:
MSBUILD : error MSB4166: =====================
MSBUILD : error MSB4166: 8/21/2024 8:58:50 PM
MSBUILD : error MSB4166: System.ArgumentNullException: Value cannot be null. (Parameter 'value')
MSBUILD : error MSB4166:    at System.ArgumentNullException.Throw(String paramName)
MSBUILD : error MSB4166:    at System.IO.BinaryWriter.Write(String value)
MSBUILD : error MSB4166:    at Microsoft.Build.Framework.TelemetryEventArgs.WriteToStream(BinaryWriter writer)
MSBUILD : error MSB4166:    at Microsoft.Build.Shared.LogMessagePacketBase.WriteToStream(ITranslator translator)
MSBUILD : error MSB4166:    at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue`1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump)
MSBUILD : error MSB4166: ===================
MSBUILD : error MSB4166:
MSBUILD : error MSB4166:
Build failed. Properties, Items, and Target results cannot be obtained. See details in stderr above.

PS aspire-samples\samples\AspireShop\AspireShop.AppHost>
davidfowl commented 2 months ago

cc @baronfel

ericziko commented 2 months ago

Gush & Swoon the amazing @davidfowl saw my problem! Huge fan of your work Dave & just recently listened to your most recent interview on .NET rocks. Really looking forward to digging into Aspire!

baronfel commented 2 months ago

@ericziko what SDK version are you using here? We had a regression in container publishing in 8.0.400, but if you update to the 8.0.401 hotfix you should be all fixed up.

ericziko commented 2 months ago

@baronfel - Thank you, updating to 8.0.401 fixed the issue