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

[WebToolsE2E][Aspire] There is a yellow message display "Ignoring other projects present but not referenced by app host:xxx" when running azd init and initializing it in Aspire Starter App project #5278

Open
Rita003 opened this issue Aug 13, 2024 · 12 comments
Assignees
Labels
area-deployment azure Issues associated specifically with scenarios tied to using Azure bug Something isn't working

Comments

@Rita003
Copy link

Rita003 commented Aug 13, 2024

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install SDK 8.0.303
  3. Install Aspire 8.1.0
  4. Install latest released azd v1.9.5
  5. Install git v2.46.0

REPRO STEPS

  1. Open CMD, run following command to create an Aspire Starter App project and go to the solution folder
dotnet new aspire-starter -o AspireStarterApp
cd AspireStarterApp
  1. Running azd init, then select 'Use code in the current directory'

Note:

  1. This issue doesn't repro if I go to AspireStarterApp.AppHost project and running azd init in CMD.

ACTUAL
There is a yellow message display when running azd init and initialize it
Screenshot 2024-08-13 142233

EXPECTED
Running azd init and initialize it without any message
Screenshot 2024-08-13 144933

Error Log
Ignoring other projects present but not referenced by app host: AspireStarterApp.ApiService and AspireStarterApp.Web

@adamint
Copy link
Member

adamint commented Aug 13, 2024

@snehapar9

@davidfowl
Copy link
Member

cc @vhvb1989 @ellismg

@davidfowl davidfowl added area-deployment azure Issues associated specifically with scenarios tied to using Azure and removed area-templates labels Aug 14, 2024
@davidfowl davidfowl added the bug Something isn't working label Sep 15, 2024
@rajeshkamal5050
Copy link

@weikanglim
Copy link

The warning message:
Ignoring other projects present but not referenced by app host: AspireStarterApp.ApiService and AspireStarterApp.Web

Means that:

  • azd parsed the manifest and look at the projects referenced in the app host
  • azd doesn't think that AspireStarterApp.ApiService and AspireStarterApp.Web are being referenced in the app host

@ellismg @vhvb1989 Need someone to take a quick look what changed here (is it just the starter being weird? or did something change in how the filtering logic works in azd?)

@ellismg
Copy link

ellismg commented Sep 17, 2024

@ellismg @vhvb1989 Need someone to take a quick look what changed here (is it just the starter being weird? or did something change in how the filtering logic works in azd?)

I'll take a look, I don't think that anything changed here recently, so this is sort of surprising.

@ellismg ellismg self-assigned this Sep 17, 2024
@vhvb1989
Copy link

did not repro on Linux.
It might be related to Azure/azure-dev#4263 @ellismg

@ellismg
Copy link

ellismg commented Sep 18, 2024

I was unable to get this to repo on Windows with Aspire 8.2.0 and azd 1.10.1

@ellismg ellismg closed this as completed Sep 18, 2024
@Rita003
Copy link
Author

Rita003 commented Sep 19, 2024

@rajeshkamal5050 @ellismg I verified that this issue still repro when running azd init and initializing it in Aspire Starter solution with Aspire 8.2.0 and azd 1.10.1, and it also repro on Aspire 9.0P4 and azd 1.10.1, I want to confirm whether we can run azd init and initialize it in Aspire Starter solution?

@vhvb1989
Copy link

@Rita003 , would it be possible for you to create a video and upload?

Also, can you run azd init --debug and share the logs?

thank you

@ellismg
Copy link

ellismg commented Sep 19, 2024

@Rita003 - Can you give me more details on the machine type in question as well? I wasn't able to get this to reproduce on Windows (via DevBox) with the exact same versions you use so I'm sort of confused as to what might be going on. I'm also just running azd init over the output of dotnet new aspire-starter so I really don't understand what the difference between yours and mine is.

@weikanglim weikanglim reopened this Sep 19, 2024
@Rita003
Copy link
Author

Rita003 commented Sep 20, 2024

@Rita003 , would it be possible for you to create a video and upload?

Also, can you run azd init --debug and share the logs?

thank you

@vhvb1989 This is the video I recorded

AZD

Run azd init --debug and share the logs

2024/09/20 02:12:37 main.go:56: azd version: 1.10.1 (commit 31409a33266fb4a5fdbb644bc83988e725d6c7c9)
2024/09/20 02:12:37 main.go:214: using cached latest version: 1.10.1 (expires on: 2024-09-20T04:52:43Z)
2024/09/20 02:12:37 user_config_manager.go:39: creating empty config since 'C:\Users\v-ritagao\.azd\config.json' did not exist.
2024/09/20 02:12:37 middleware.go:108: running middleware 'debug'
2024/09/20 02:12:37 middleware.go:108: running middleware 'ux'
2024/09/20 02:12:37 middleware.go:108: running middleware 'experimentation'
2024/09/20 02:12:37 experimentation.go:42: assignment context: 9936g960:76971;
2024/09/20 02:12:37 middleware.go:108: running middleware 'telemetry'
2024/09/20 02:12:37 telemetry.go:43: TraceID: 0ba36a2c0953ae59ed93a35d0c1fb082
2024/09/20 02:12:37 user_config_manager.go:39: creating empty config since 'C:\Users\v-ritagao\.azd\config.json' did not exist.
2024/09/20 02:12:37 command_runner.go:307: Run exec: 'git --version' , exit code: 0
-------------------------------------stdout-------------------------------------------
git version 2.46.1.windows.1
2024/09/20 02:12:37 git.go:55: git version: git version 2.46.1.windows.1

Initializing an app to run on Azure (azd init)

? How do you want to initialize your app? Use code in the current directory

  |       | Scanning app code in current directory2024/09/20 02:12:40 appdetect.go:251: Detecting projects in directory: C:\Users\v-ritagao\aspire3
2024/09/20 02:12:40 appdetect.go:251: Detecting projects in directory: C:\Users\v-ritagao\aspire3\aspire3.ApiService
  |===    | Scanning app code in current directory2024/09/20 02:12:40 command_runner.go:307: Run exec: 'dotnet msbuild C:\Users\v-ritagao\aspire3\aspire3.ApiService\aspire3.ApiService.csproj --getProperty:IsAspireHost' , exit code: 0
  |====== | Scanning app code in current directory2024/09/20 02:12:41 command_runner.go:307: Run exec: 'dotnet msbuild C:\Users\v-ritagao\aspire3\aspire3.ApiService\aspire3.ApiService.csproj --getProperty:RuntimeIdentifier' , exit code: 0
2024/09/20 02:12:41 appdetect.go:259: Found project dotnet at C:\Users\v-ritagao\aspire3\aspire3.ApiService
2024/09/20 02:12:41 appdetect.go:251: Detecting projects in directory: C:\Users\v-ritagao\aspire3\aspire3.AppHost
  |  =====| Scanning app code in current directory2024/09/20 02:12:42 command_runner.go:307: Run exec: 'dotnet msbuild C:\Users\v-ritagao\aspire3\aspire3.AppHost\aspire3.AppHost.csproj --getProperty:IsAspireHost' , exit code: 0
2024/09/20 02:12:42 appdetect.go:259: Found project dotnet-apphost at C:\Users\v-ritagao\aspire3\aspire3.AppHost
2024/09/20 02:12:42 appdetect.go:251: Detecting projects in directory: C:\Users\v-ritagao\aspire3\aspire3.ServiceDefaults
  |     ==| Scanning app code in current directory2024/09/20 02:12:42 command_runner.go:307: Run exec: 'dotnet msbuild C:\Users\v-ritagao\aspire3\aspire3.ServiceDefaults\aspire3.ServiceDefaults.csproj --getProperty:IsAspireHost' , exit code: 0
2024/09/20 02:12:42 appdetect.go:251: Detecting projects in directory: C:\Users\v-ritagao\aspire3\aspire3.Web
  |==     | Scanning app code in current directory2024/09/20 02:12:43 command_runner.go:307: Run exec: 'dotnet msbuild C:\Users\v-ritagao\aspire3\aspire3.Web\aspire3.Web.csproj --getProperty:IsAspireHost' , exit code: 0
  |=====  | Scanning app code in current directory2024/09/20 02:12:44 command_runner.go:307: Run exec: 'dotnet msbuild C:\Users\v-ritagao\aspire3\aspire3.Web\aspire3.Web.csproj --getProperty:RuntimeIdentifier' , exit code: 0
2024/09/20 02:12:44 appdetect.go:259: Found project dotnet at C:\Users\v-ritagao\aspire3\aspire3.Web
  |      =| Scanning app code in current directory2024/09/20 02:12:54 command_runner.go:307: Run exec: 'dotnet run --project aspire3.AppHost.csproj --publisher manifest --output-path C:\Users\V-RITA~1\AppData\Local\Temp\azd-provision3962911680\apphost-manifest.json' , exit code: 0
-------------------------------------stdout-------------------------------------------
Building...
info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 8.2.0+75fdcff28495bdd643f6323133a7d411df71ab70
info: Aspire.Hosting.Publishing.ManifestPublisher[0]
      Published manifest to: C:\Users\v-ritagao\AppData\Local\Temp\azd-provision3962911680\apphost-manifest.json
  (✓) Done: Scanning app code in current directory

Ignoring other projects present but not referenced by app host: aspire3.ApiService and aspire3.Web

Detected services:

  .NET (Aspire)
  Detected in: C:\Users\v-ritagao\aspire3\aspire3.AppHost\aspire3.AppHost.csproj

azd will generate the files necessary to host your app on Azure using Azure Container Apps.

? Select an option Confirm and continue initializing my app
2024/09/20 02:12:57 user_config_manager.go:39: creating empty config since 'C:\Users\v-ritagao\.azd\config.json' did not exist.
2024/09/20 02:12:57 project.go:144: Reading project from file 'C:\Users\v-ritagao\aspire3\azure.yaml'
? Enter a new environment name: Rita92001

Generating files to run your app on Azure:

2024/09/20 02:13:06 initializer.go:164: template init, checking for duplicates. source: C:\Users\V-RITA~1\AppData\Local\Temp\azd-infra1294484606 target: C:\Users\v-ritagao\aspire3
  (✓) Done: Generating ./azure.yaml
  (✓) Done: Generating ./next-steps.md

SUCCESS: Your app is ready for the cloud!
You can provision and deploy your app to Azure by running the azd up command in this directory. For more information on configuring your app, see ./next-steps.md

@Rita003
Copy link
Author

Rita003 commented Sep 20, 2024

@Rita003 - Can you give me more details on the machine type in question as well? I wasn't able to get this to reproduce on Windows (via DevBox) with the exact same versions you use so I'm sort of confused as to what might be going on. I'm also just running azd init over the output of dotnet new aspire-starter so I really don't understand what the difference between yours and mine is.

@ellismg My reproduce machine type is Windows-11-Enterprise-23H2. This issue only reproduce when running azd init in Aspire Starter solution instead of AppHost project, this issue will not be reproduced if you go to AppHost project to run azd init. For the detailed steps, please refer to the video above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-deployment azure Issues associated specifically with scenarios tied to using Azure bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants