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] Creating Aspire project, there are warning icons displayed on Dependencies | Packages of the AppHost project. #5679

Open
vmykagapuz opened this issue Sep 11, 2024 · 7 comments
Labels
area-templates bug Something isn't working

Comments

@vmykagapuz
Copy link

vmykagapuz commented Sep 11, 2024

REGRESSION

  1. Doesn't repro with SDK 9.0 RC1 + Aspire 8.2.0

INSTALL STEPS

  1. Clean machine: Win11 x64 22h2 ENU
  2. Install SDK 9.0 RC2 daily build
  3. Install Aspire 8.2.0
  4. Install VSCode or VS

REPRO STEPS

  1. Open CMD, create an Aspire Starter App using following commands:
    dotnet new aspire-starter -o AspireStarterApp
  2. Open this project using VSCode or VS.

ACTUAL
Dependencies | Packages show warning icon. No warnings in Error List.
image

image

EXPECTED
There should be no warning icons displayed.

@vmykagapuz vmykagapuz changed the title [WebToolsE2E][Aspire] After creating Aspire project, there are warning icons displayed on AppHost project| [WebToolsE2E][Aspire] Creating Aspire project, there are warning icons displayed on Dependencies | Packages of the AppHost project. Sep 11, 2024
@v-elenafeng
Copy link

Should be a similar issue caused by SDK 9.0 RC2 as dotnet/sdk#43341.

@davidfowl davidfowl added the bug Something isn't working label Sep 11, 2024
@davidfowl
Copy link
Member

cc @eerhardt @joperezr

@eerhardt
Copy link
Member

Is there any indication for what is being warned?

cc @tlmii @BillHiebert

@BillHiebert
Copy link
Contributor

This a duplicate issue. Tracked by #5436 which indicates it is fixed in Aspire 9.0.0-preview.4.24454.4.

@davidfowl davidfowl closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2024
@joperezr
Copy link
Member

This a duplicate issue. Tracked by #5436 which indicates it is fixed in Aspire 9.0.0-preview.4.24454.4.

I don't think this is a duplicate, the referenced one was around project nodes and we ended up figuring out the issue for that, but this is about NuGet package dependencies, so I don't think this is a dupe. Re-opening to ensure we get to the bottom of the issue.

@joperezr joperezr reopened this Sep 11, 2024
@joperezr
Copy link
Member

I think I found out what the problem is. The issue is likely caused by the new feature in NuGet to surface vulnerabilities in dependencies. There is a vulnerability declared in NuGet for package System.Text.Json version 8.0.0 which is a transitive dependency for package Aspire.Hosting.AppHost. VS recently started surfacing these errors into the solution explorer, so that is likely what is happening here. The fix would be to make sure that we "pin up" our dependency of System.Text.Json so that new Aspire projects don't have these warnings.

Here is the dependency chain of how System.Text.Json 8.0.0 is coming to the picture:

dotnet nuget why .\AspireApp.AppHost.csproj System.Text.Json
Project 'AspireApp.AppHost' has the following dependency graph(s) for 'System.Text.Json':

  [net8.0]
   │
   └─ Aspire.Hosting.AppHost (v9.0.0-dev)
      ├─ Aspire.Hosting (v9.0.0-dev)
      │  └─ Microsoft.Extensions.Hosting (v8.0.0)
      │     ├─ Microsoft.Extensions.Configuration.Json (v8.0.0)
      │     │  └─ System.Text.Json (v8.0.0)
      │     ├─ Microsoft.Extensions.Configuration.UserSecrets (v8.0.0)
      │     │  └─ Microsoft.Extensions.Configuration.Json (v8.0.0)
      │     │     └─ System.Text.Json (v8.0.0)
      │     ├─ Microsoft.Extensions.Logging.Console (v8.0.0)
      │     │  └─ System.Text.Json (v8.0.0)
      │     └─ Microsoft.Extensions.Logging.EventSource (v8.0.0)
      │        └─ System.Text.Json (v8.0.0)
      └─ Microsoft.Extensions.Hosting (v8.0.0)
         ├─ Microsoft.Extensions.Configuration.Json (v8.0.0)
         │  └─ System.Text.Json (v8.0.0)
         ├─ Microsoft.Extensions.Configuration.UserSecrets (v8.0.0)
         │  └─ Microsoft.Extensions.Configuration.Json (v8.0.0)
         │     └─ System.Text.Json (v8.0.0)
         ├─ Microsoft.Extensions.Logging.Console (v8.0.0)
         │  └─ System.Text.Json (v8.0.0)
         └─ Microsoft.Extensions.Logging.EventSource (v8.0.0)
            └─ System.Text.Json (v8.0.0)

@v-elenafeng
Copy link

v-elenafeng commented Sep 13, 2024

VS recently started surfacing these errors into the solution explorer, so that is likely what is happening here.

Yes, after manually updating 'System.Text.Json' to 8.0.4, the warning disappeared.
Here is a known issue 3047 tracks the vulnerable package.

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

No branches or pull requests

6 participants