-
Notifications
You must be signed in to change notification settings - Fork 479
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
Allow NoWarn on ProjectReference to supress ASPIRE004 #5230
base: main
Are you sure you want to change the base?
Conversation
Can you describe the scenario where you would want to suppress this warning? |
@eerhardt Yes - a project reference to a class library (or in my case an IIS Express SDK project) where you want the project information to be able to use it in a resource but it is not executable. <ItemGroup>
<ProjectReference Include="..\..\..\src\C3D\Extensions\Aspire\IISExpress\C3D.Extensions.Aspire.IISExpress.csproj" IsAspireProjectResource="false" />
<ProjectReference Include="..\..\..\src\C3D\Extensions\Aspire\WaitFor\C3D.Extensions.Aspire.WaitFor.csproj" IsAspireProjectResource="false" />
<ProjectReference Include="..\EF6\EF6WebApp.csproj" NoWarn="ASPIRE004"/>
</ItemGroup> This is similar to suppressing nuget package warning etc. |
I think that approach would be better. I'm not sure the "NoWarn" on the ProjectReference is a gesture used anywhere else. So I wouldn't want to invent it here. Also the way the current PR is, it only supports a single "NoWarn", not a list. Also, can you add a test for this scenario? Here is where the existing tests are: aspire/tests/Aspire.Hosting.Tests/MSBuildTests.cs Lines 12 to 16 in 583014c
|
@eerhardt NoWarn is metadata used on I'll have a look at the tests and see what I can do. I'm struggling with the running a local version of aspire just now, so it may be a while before I can get to dealing with the tests. dotnet workload restore
Installing workloads: aspire
Workload(s) 'aspire' are already installed.
Workload installation failed. Rolling back installed packs...
Workload installation failed: Failed to verify Authenticode signature, package: C:\ProgramData\dotnet\workloads\Aspire.Hosting.Sdk.Msi.x64\8.1.1-preview.1.24407.6\237134c84b4f4287a12f177ddc6df49f-x64.msi, allow online revocation checks: True Error: 0x800b0100, No signature was present in the subject. This was after .\eng\installLatestFromReleaseBranch.ps1 -FromMain |
Oh and another area where this would be useful is rr-wfm/MSBuild.Sdk.SqlProj#585 |
Description
Allow the suppression of the
ASPIRE004
error message perProjectReference
using theNoWarn
property.Checklist
<remarks />
and<code />
elements on your triple slash comments?Microsoft Reviewers: Open in CodeFlow