Closed sb-chericks closed 3 weeks ago
@sb-chericks thanks for reporting.
@vhvb1989 can you check if anything on azd side?
cc @davidfowl @mitchdenny
@sb-chericks can you share your AppHost code? It looks like there's some input missing during deploy
Here is the content of my AppHost/Program.cs
, let me know if you need to see something else. I've redacted my business namespaces and names.
using Microsoft.Extensions.Configuration;
using Projects;
const string applicationInsightsIdentifier = "ApplicationInsightsTelemetry";
var builder = DistributedApplication.CreateBuilder(args);
IResourceBuilder<IResourceWithConnectionString> identityDatabaseResource;
IResourceBuilder<IResourceWithConnectionString> applicationInsightsTelemetryResource;
if (builder.ExecutionContext.IsRunMode)
{
builder.Configuration.AddUserSecrets<Program>();
identityDatabaseResource = builder.AddSqlServer(
"identity-context",
builder.AddParameter("LocalDatabasePassword", true))
.WithDataVolume("identityContextVolume").AddDatabase(Constants.IdentityContextIdentifier);
applicationInsightsTelemetryResource = builder.AddConnectionString(
applicationInsightsIdentifier,
"APPLICATIONINSIGHTS_CONNECTION_STRING");
}
else
{
identityDatabaseResource = builder.AddConnectionString(Constants.IdentityContextIdentifier);
applicationInsightsTelemetryResource = builder.AddAzureApplicationInsights(applicationInsightsIdentifier);
}
var redisResource = builder.AddConnectionString(Constants.RedisIdentifier);
var gemDatabaseResource = builder.AddConnectionString(Constants.GemContextIdentifier);
var customerPrefetchResource = builder.AddConnectionString(Constants.ServiceBus.CustomerPrefetchSendIdentifier);
var marketingCampaignsResource = builder.AddConnectionString(Constants.ServiceBus.MarketingCampaignsSendIdentifier);
builder.AddProject<My_Business_Aspire_ServerServer>("server-server")
.WithExternalHttpEndpoints()
.WithReference(gemDatabaseResource)
.WithReference(identityDatabaseResource)
.WithReference(redisResource)
.WithReference(customerPrefetchResource)
.WithReference(marketingCampaignsResource)
.WithReference(applicationInsightsTelemetryResource)
.WithConfigurationParameters<IdentityConfiguration>()
.WithConfigurationParameters<CrmConfiguration>()
.WithConfigurationParameters<DialerConfiguration>()
.WithConfigurationParameters<GemInstallerConfiguration>()
.WithConfigurationParameters<DataStoreConfiguration>()
.WithConfigurationParameters<DoubleBookerConfiguration>()
.WithConfigurationParameters<GoogleConfiguration>()
.WithConfigurationParameters<ServerServerConfiguration.ServerServerApplicationConfiguration>()
.WithConfigurationParameters<ServerServerConfiguration.AzureAdConfiguration>()
.WithConfigurationParameters<ServerServerConfiguration.QueueNameConfiguration>()
.WithConfigurationParameters<ServerServerConfiguration.SignalRNegotiateConfiguration>();
// Some configs are being added twice.
// We need to figure out a way to just do it once for both projects.
builder.AddProject<My_Business_Aspire_ClientServer>("client-server")
.WithExternalHttpEndpoints()
.WithReference(gemDatabaseResource)
.WithReference(identityDatabaseResource)
.WithReference(redisResource)
.WithConfigurationParameters<GemInstallerConfiguration>()
.WithConfigurationParameters<DoubleBookerConfiguration>()
.WithConfigurationParameters<DataStoreConfiguration>()
.WithConfigurationParameters<GoogleConfiguration>()
.WithConfigurationParameters<IdentityConfiguration>()
.WithConfigurationParameters<CrmConfiguration>()
.WithConfigurationParameters<DialerConfiguration>()
.WithConfigurationParameters<ClientServerConfiguration.ClientServerApplicationConfiguration>()
.WithConfigurationParameters<ClientServerConfiguration.CentersDialTimeMinMaxConfiguration>()
.WithConfigurationParameters<ClientServerConfiguration.AccessTokenConfiguration>()
.WithConfigurationParameters<ClientServerConfiguration.HostConfiguration>();
builder.Build().Run();
I'm starting to suspect something is wrong with my dotnet
installation. I'm running the latest 8.0.4
release, but my work partner was able to run azd deploy
with my same repository with no problems. The educated guess of my colleague right now is that there is some parallelism issue with the dotnet build
process that is failing.
I'm going to completely purge and reinstall dotnet
and see if this helps.
@sb-chericks any updates?
Thanks for checking back @rajeshkamal5050.
No, this did not solve the problem. Of my 4 person team, 2 members were able to manually deploy the Aspire project to Azure, while 2 were not (same issue I detail above for both users).
We are all:
It must be some underlying issue with the installation of the software on the individual machine itself, or some artifact in the individual Windows user profile somewhere that is causing the issue.
The two of us that are failing have given up on this endeavor, since we nearly have our azure dev ops pipeline script finished and will be able to rely on that for deployments instead.
If you don't think this is worth pursuing, I can close the issue.
@sb-chericks suspecting due to this Update your .NET SDK to 8.0.401. There was a regression with container publish.
Related issues
I think we can close this. The resolution is updating the SDK.
Agreed, we can close this. I haven't had time to confirm this was the issue for me, but will next week. My co-worker did confirm it fixed the identical issue for him.
Thanks so much for your help guys.
Output from
azd version
azd version 1.10.1 (commit 31409a33266fb4a5fdbb644bc83988e725d6c7c9)Describe the bug Running my Aspire project locally works just great, all containers mount successfully and my 2 API applications run and respond correctly. I have run
azd auth login
,azd env select MY_ENV_NAME
, andazd provision
successfully.However running
azd deploy
throwsSystem.ArgumentNullException
fromSystem.IO.BinaryWriter.Write(String value)
. A full dump of the command logs are added below.Running
azd deploy --debug
for the full debug logs doesn't add any useful information.To Reproduce I'm not sure how to reproduce this.
Expected behavior Azd successfully deploys the built app to my Azure Environment
Environment Information on your environment:
Additional context