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

Using the code in the Auth example causes a azd error when trying to init / provision #40

Open
pltaylor opened this issue Jul 8, 2024 · 0 comments

Comments

@pltaylor
Copy link

pltaylor commented Jul 8, 2024

When using the ..\eshop-app-workshop\labs\3-Add-Identity\end\eShop.lab3.end.sln and trying to azd init as an example you get the following error

ERROR: failed to generate manifest from app host project: generating app host manifest: dotnet run --publisher manifest on project 'C:\Repos\eshop-app-workshop\labs\3-Add-Identity\end\eShop.AppHost\eShop.AppHost.csproj' failed: exit code: 3762504530, stdout: Building...
info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 8.0.1+a6e341ebbf956bbcec0dda304109815fcbae70c9
fail: Microsoft.Extensions.Hosting.Internal.Host[11]
      Hosting failed to start
      System.InvalidOperationException: The endpoint `http` is not allocated for the resource `webapp`.
         at Aspire.Hosting.ApplicationModel.EndpointReference.get_AllocatedEndpoint() in /_/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs:line 107
         at Aspire.Hosting.ApplicationModel.EndpointReference.get_Host() in /_/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs:line 89
         at Program.<>c__DisplayClass0_0.<<Main>$>b__0() in C:\Repos\eshop-app-workshop\labs\3-Add-Identity\end\eShop.AppHost\Program.cs:line 37
         at Aspire.Hosting.ApplicationModel.EnvironmentCallbackAnnotation.<>c__DisplayClass1_0.<.ctor>b__0(EnvironmentCallbackContext c) in /_/src/Aspire.Hosting/ApplicationModel/EnvironmentCallbackAnnotation.cs:line 29
         at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteEnvironmentVariablesAsync(IResource resource) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 357
         at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteContainerAsync(ContainerResource container) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 248
         at Aspire.Hosting.Publishing.ManifestPublishingContext.<>c__DisplayClass20_0.<<WriteResourceAsync>g__WriteResourceObjectAsync|1>d`1.MoveNext() in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 125
      --- End of stack trace from previous location ---
         at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteResourceAsync(IResource resource) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 99
         at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteModel(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 75
         at Aspire.Hosting.Publishing.ManifestPublisher.WriteManifestAsync(DistributedApplicationModel model, Utf8JsonWriter jsonWriter, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 53
         at Aspire.Hosting.Publishing.ManifestPublisher.PublishInternalAsync(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 42
         at Aspire.Hosting.Publishing.ManifestPublisher.PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 26
         at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
         at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
, stderr: Unhandled exception. System.AggregateException: One or more errors occurred. (The endpoint `http` is not allocated for the resource `webapp`.)
 ---> System.InvalidOperationException: The endpoint `http` is not allocated for the resource `webapp`.
   at Aspire.Hosting.ApplicationModel.EndpointReference.get_AllocatedEndpoint() in /_/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs:line 107
   at Aspire.Hosting.ApplicationModel.EndpointReference.get_Host() in /_/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs:line 89
   at Program.<>c__DisplayClass0_0.<<Main>$>b__0() in C:\Repos\eshop-app-workshop\labs\3-Add-Identity\end\eShop.AppHost\Program.cs:line 37
   at Aspire.Hosting.ApplicationModel.EnvironmentCallbackAnnotation.<>c__DisplayClass1_0.<.ctor>b__0(EnvironmentCallbackContext c) in /_/src/Aspire.Hosting/ApplicationModel/EnvironmentCallbackAnnotation.cs:line 29
   at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteEnvironmentVariablesAsync(IResource resource) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 357
   at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteContainerAsync(ContainerResource container) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 248
   at Aspire.Hosting.Publishing.ManifestPublishingContext.<>c__DisplayClass20_0.<<WriteResourceAsync>g__WriteResourceObjectAsync|1>d`1.MoveNext() in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 125
--- End of stack trace from previous location ---
   at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteResourceAsync(IResource resource) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 99
   at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteModel(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 75
   at Aspire.Hosting.Publishing.ManifestPublisher.WriteManifestAsync(DistributedApplicationModel model, Utf8JsonWriter jsonWriter, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 53
   at Aspire.Hosting.Publishing.ManifestPublisher.PublishInternalAsync(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 42
   at Aspire.Hosting.Publishing.ManifestPublisher.PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 26
   at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
   at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Aspire.Hosting.DistributedApplication.RunAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/DistributedApplication.cs:line 310
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Aspire.Hosting.DistributedApplication.Run() in /_/src/Aspire.Hosting/DistributedApplication.cs:line 338
   at Program.<Main>$(String[] args) in C:\Repos\eshop-app-workshop\labs\3-Add-Identity\end\eShop.AppHost\Program.cs:line 53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant