roslyn: "duplicated attribute" errors with a clean build

A bunch of “duplicated attribute” errors with a clean build off of master, features/compiler, etc

VS: 15.6 preview 6

D:\dotnet\roslyn\Binaries\Obj\VisualBasicSyntaxGenerator\Debug\GeneratedAssemblyInfo_42.42.42.42424.vb(20,2): error BC30663: Attribute 'AssemblyInformationalVersionAttribute' cannot be applied multiple times. [D:\dotnet\roslyn\src\Tools\Source\CompilerGenerator
Tools\Source\VisualBasicSyntaxGenerator\VisualBasicSyntaxGenerator.vbproj]
D:\dotnet\roslyn\Binaries\Obj\VisualBasicErrorFactsGenerator\Debug\GeneratedAssemblyInfo_42.42.42.42424.vb(16,2): error BC30663: Attribute 'AssemblyCompanyAttribute' cannot be applied multiple times. [D:\dotnet\roslyn\src\Tools\Source\CompilerGeneratorTools\Sou
rce\VisualBasicErrorFactsGenerator\VisualBasicErrorFactsGenerator.vbproj]
D:\dotnet\roslyn\Binaries\Obj\VisualBasicErrorFactsGenerator\Debug\GeneratedAssemblyInfo_42.42.42.42424.vb(18,2): error BC30663: Attribute 'AssemblyVersionAttribute' cannot be applied multiple times. [D:\dotnet\roslyn\src\Tools\Source\CompilerGeneratorTools\Sou
rce\VisualBasicErrorFactsGenerator\VisualBasicErrorFactsGenerator.vbproj]
D:\dotnet\roslyn\Binaries\Obj\VisualBasicErrorFactsGenerator\Debug\GeneratedAssemblyInfo_42.42.42.42424.vb(19,2): error BC30663: Attribute 'AssemblyFileVersionAttribute' cannot be applied multiple times. [D:\dotnet\roslyn\src\Tools\Source\CompilerGeneratorTools
\Source\VisualBasicErrorFactsGenerator\VisualBasicErrorFactsGenerator.vbproj]
D:\dotnet\roslyn\Binaries\Obj\VisualBasicErrorFactsGenerator\Debug\GeneratedAssemblyInfo_42.42.42.42424.vb(20,2): error BC30663: Attribute 'AssemblyInformationalVersionAttribute' cannot be applied multiple times. [D:\dotnet\roslyn\src\Tools\Source\CompilerGener
atorTools\Source\VisualBasicErrorFactsGenerator\VisualBasicErrorFactsGenerator.vbproj]
D:\dotnet\roslyn\Binaries\Obj\CodeAnalysis\Debug\GeneratedAssemblyInfo_42.42.42.42424.cs(14,12): error CS0579: Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute [D:\dotnet\roslyn\src\Compilers\Core\Portable\CodeAnalysis.csproj]
D:\dotnet\roslyn\Binaries\Obj\CodeAnalysis\Debug\GeneratedAssemblyInfo_42.42.42.42424.cs(16,12): error CS0579: Duplicate 'System.Reflection.AssemblyVersionAttribute' attribute [D:\dotnet\roslyn\src\Compilers\Core\Portable\CodeAnalysis.csproj]
D:\dotnet\roslyn\Binaries\Obj\CodeAnalysis\Debug\GeneratedAssemblyInfo_42.42.42.42424.cs(17,12): error CS0579: Duplicate 'System.Reflection.AssemblyFileVersionAttribute' attribute [D:\dotnet\roslyn\src\Compilers\Core\Portable\CodeAnalysis.csproj]
D:\dotnet\roslyn\Binaries\Obj\CodeAnalysis\Debug\GeneratedAssemblyInfo_42.42.42.42424.cs(18,12): error CS0579: Duplicate 'System.Reflection.AssemblyInformationalVersionAttribute' attribute [D:\dotnet\roslyn\src\Compilers\Core\Portable\CodeAnalysis.csproj]
D:\dotnet\roslyn\Binaries\Obj\MSBuildTask\Debug\GeneratedAssemblyInfo_42.42.42.42424.cs(14,12): error CS0579: Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute [D:\dotnet\roslyn\src\Compilers\Core\MSBuildTask\MSBuildTask.csproj]
D:\dotnet\roslyn\Binaries\Obj\MSBuildTask\Debug\GeneratedAssemblyInfo_42.42.42.42424.cs(16,12): error CS0579: Duplicate 'System.Reflection.AssemblyVersionAttribute' attribute [D:\dotnet\roslyn\src\Compilers\Core\MSBuildTask\MSBuildTask.csproj]
D:\dotnet\roslyn\Binaries\Obj\MSBuildTask\Debug\GeneratedAssemblyInfo_42.42.42.42424.cs(17,12): error CS0579: Duplicate 'System.Reflection.AssemblyFileVersionAttribute' attribute [D:\dotnet\roslyn\src\Compilers\Core\MSBuildTask\MSBuildTask.csproj]
D:\dotnet\roslyn\Binaries\Obj\MSBuildTask\Debug\GeneratedAssemblyInfo_42.42.42.42424.cs(18,12): error CS0579: Duplicate 'System.Reflection.AssemblyInformationalVersionAttribute' attribute [D:\dotnet\roslyn\src\Compilers\Core\MSBuildTask\MSBuildTask.csproj]
...

Anyone else hitting this?

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 20 (18 by maintainers)

Most upvoted comments

Don’t forget git clean -xdf bit. the time I encountered this, it seemed that my repo was getting out of date once we were moving to newer sdks.

@AdamSpeight2008 experienced the same issue (he couldn’t for some reason post on his own, so I’m doing so in his name). He is using VS2017 Community Release & Preview. A gist of his error list can be found here. @alrz can you provide more details on your work around as deleting didn’t worked for @AdamSpeight2008.