Compiler Warning ASPIRE004
Esta página aún no está disponible en tu idioma.
The Project reference isn’t to an executable project, so won’t be launched. Did you mean to set IsAspireProjectResource=“false”?
The project being referenced by the Aspire AppHost isn’t an executable, but is being treated like one for the purposes of orchestration.
To correct this warning
Section titled “To correct this warning”Either change the build type of the project to an executable, or add the IsAspireProjectResource="false" setting to the project reference in your Aspire AppHost project file, as demonstrated in the following snippet:
<ItemGroup> <ProjectReference Include="..\OtherProjects\Contracts.csproj" IsAspireProjectResource="false" /></ItemGroup>Suppress the warning
Section titled “Suppress the warning”Suppress the warning with either of the following methods:
-
Set the severity of the rule in the .editorconfig file.
.editorconfig [*.{cs,vb}]dotnet_diagnostic.ASPIRE004.severity = noneFor more information about editor config files, see Configuration files for code analysis rules.
-
Add the following
PropertyGroupto your project file:<PropertyGroup><NoWarn>$(NoWarn);ASPIRE004</NoWarn></PropertyGroup>