-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Labels
Milestone
Description
Most probably introduced in #62593.
Current blazor template structure:

and build failing with:
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
MyBlazorApp failed with 16 error(s) (19,3s)
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\BlazorWeb-CSharp\obj\Debug\net10.0\.NETCoreApp,Version=v10.0.AssemblyAttributes.cs(4,12): error CS0579: Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\BlazorWeb-CSharp\obj\Debug\net10.0\BlazorWeb-CSharp.AssemblyInfo.cs(13,12): error CS0579: Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\BlazorWeb-CSharp\obj\Debug\net10.0\BlazorWeb-CSharp.AssemblyInfo.cs(14,12): error CS0579: Duplicate 'System.Reflection.AssemblyConfigurationAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\BlazorWeb-CSharp\obj\Debug\net10.0\BlazorWeb-CSharp.AssemblyInfo.cs(15,12): error CS0579: Duplicate 'System.Reflection.AssemblyFileVersionAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\BlazorWeb-CSharp\obj\Debug\net10.0\BlazorWeb-CSharp.AssemblyInfo.cs(16,12): error CS0579: Duplicate 'System.Reflection.AssemblyInformationalVersionAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\BlazorWeb-CSharp\obj\Debug\net10.0\BlazorWeb-CSharp.AssemblyInfo.cs(17,12): error CS0579: Duplicate 'System.Reflection.AssemblyProductAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\BlazorWeb-CSharp\obj\Debug\net10.0\BlazorWeb-CSharp.AssemblyInfo.cs(18,12): error CS0579: Duplicate 'System.Reflection.AssemblyTitleAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\BlazorWeb-CSharp\obj\Debug\net10.0\BlazorWeb-CSharp.AssemblyInfo.cs(19,12): error CS0579: Duplicate 'System.Reflection.AssemblyVersionAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\obj\Debug\net10.0\.NETCoreApp,Version=v10.0.AssemblyAttributes.cs(4,12): error CS0579: Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\obj\Debug\net10.0\MyBlazorApp.AssemblyInfo.cs(13,12): error CS0579: Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\obj\Debug\net10.0\MyBlazorApp.AssemblyInfo.cs(14,12): error CS0579: Duplicate 'System.Reflection.AssemblyConfigurationAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\obj\Debug\net10.0\MyBlazorApp.AssemblyInfo.cs(15,12): error CS0579: Duplicate 'System.Reflection.AssemblyFileVersionAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\obj\Debug\net10.0\MyBlazorApp.AssemblyInfo.cs(16,12): error CS0579: Duplicate 'System.Reflection.AssemblyInformationalVersionAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\obj\Debug\net10.0\MyBlazorApp.AssemblyInfo.cs(17,12): error CS0579: Duplicate 'System.Reflection.AssemblyProductAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\obj\Debug\net10.0\MyBlazorApp.AssemblyInfo.cs(18,12): error CS0579: Duplicate 'System.Reflection.AssemblyTitleAttribute' attribute
C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp\obj\Debug\net10.0\MyBlazorApp.AssemblyInfo.cs(19,12): error CS0579: Duplicate 'System.Reflection.AssemblyVersionAttribute' attribute
Expected blazor template structure:

And build passing.
Build succeeded in 9,1s
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5067
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\Desktop\aspnetcore-fork3\src\ProjectTemplates\scripts\MyBlazorApp
Manual removal of additional dirs fixes the problem.
The mentioned PR changed the dir structure in src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj
. cc @DamianEdwards, can that be it?