Compiler Error ASPIRE008
‘[ProjectName]’ project requires GenerateAssemblyInfo to be enabled. The Aspire AppHost relies on assembly metadata attributes to locate required dependencies.
This error appears when an Aspire AppHost project has GenerateAssemblyInfo set to false. The Aspire AppHost relies on AssemblyMetadataAttribute to embed DCP (Developer Control Plane) and Dashboard paths during compilation. When GenerateAssemblyInfo is disabled, these attributes aren’t generated, causing runtime failures about missing orchestration dependencies.
Example
Section titled “Example”The following AppHost project file has GenerateAssemblyInfo disabled, which causes ASPIRE008:
<Project Sdk="Aspire.AppHost.Sdk/13.1.0">
<PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net10.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <UserSecretsId>98048c9c-bf28-46ba-a98e-63767ee5e3a8</UserSecretsId> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup>
</Project>To correct this error
Section titled “To correct this error”Remove the <GenerateAssemblyInfo>false</GenerateAssemblyInfo> line from your project file, or set it to true:
<Project Sdk="Aspire.AppHost.Sdk/13.1.0">
<PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net10.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <UserSecretsId>98048c9c-bf28-46ba-a98e-63767ee5e3a8</UserSecretsId> </PropertyGroup>
</Project>Suppress the error
Section titled “Suppress the error”If you must temporarily suppress this error, add the following property to your project file:
<PropertyGroup> <NoWarn>$(NoWarn);ASPIRE008</NoWarn></PropertyGroup>