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

build error from artifact (Duplicate attribute in AssemblyInfo.cs) #93

KelsonBall opened this Issue Dec 5, 2018 · 6 comments


None yet
5 participants

KelsonBall commented Dec 5, 2018

  • .NET Core Version: (e.g. 3.0 Preview1, or daily build number, use dotnet --info)

  • Windows version: (winver)
    Version 1809 (OS Build 17763.134)

  • Does the bug reproduce also in WPF for .NET Framework 4.8?: No

Problem description:

When trying to build a basic WPF project for dotnet core 3.0 I get multiple duplicate attribute errors that appear to be from a temporary file (\obj\Debug\netcoreapp3.0\NetCoreWpf_xnekjbde_wpftmp.AssemblyInfo.cs) conflicting with the actual AssemblyInfo.cs file

To get this error, after a fresh install of Visual Studio 2019 preview 1 I tried to open and build a wpf dotnet core project modified using Brian Lagunis's instructions from his blog post here. The project is empty (was generated in Visual Studio 15.9.3)

Actual behavior:
6 duplicate attribute errors fail the build.
CS0579 Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute
CS0579 Duplicate 'System.Reflection.AssemblyConfigurationAttribute' attribute
CS0579 Duplicate 'System.Reflection.AssemblyFileVersionAttribute' attribute
CS0579 Duplicate 'System.Reflection.AssemblyProductAttribute' attribute
CS0579 Duplicate 'System.Reflection.AssemblyTitleAttribute' attribute
CS0579 Duplicate 'System.Reflection.AssemblyVersionAttribute' attribute

Expected behavior:
No duplicate attribute errors occur unless there are duplicate attributes in my project, in which case the error message should point to the human-made code where the error occurs.

Minimal repro:

@fabiant3 fabiant3 added the bug label Dec 5, 2018

@fabiant3 fabiant3 assigned fabiant3 and stevenbrix and unassigned fabiant3 Dec 5, 2018

@fabiant3 fabiant3 added this to the 3.0 milestone Dec 5, 2018


This comment has been minimized.


fabiant3 commented Dec 5, 2018

@stevenbrix - can you take a look at the repro?


This comment has been minimized.


stevenbrix commented Dec 6, 2018

@KelsonBall do you get the same errors if you create a new project using dotnet new wpf from the command line? For some reason your repro project is failing to load for me in VS2019 preview 1, without any helpful error infomration. I'm going to follow the instructions on the video and see if i can get into the same state.


This comment has been minimized.


lindexi commented Dec 6, 2018

@stevenbrix We need not add the AssemblyInfo.cs file when we use the new csproj file.


This comment has been minimized.


stevenbrix commented Dec 6, 2018

@KelsonBall i looked at your .csproj file a bit closer and noticed a few issues with it:

  1. Missing <UseWpf>true</UseWpf> from the PropertyGroup
  2. Using <Project Sdk="Microsoft.NET.Sdk.Wpf"> instead of <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
  3. The FrameworkReference to Microsoft.Desktop.UI is no longer needed as that package no longer exists.
  4. There is also the issue that @lindexi mentioned above.

This comment has been minimized.


rladuca commented Dec 6, 2018

@KelsonBall Following onto what @stevenbrix said, this looks like you're following instructions that were useful before the Preview was released. At this point, you should base your project changes off of the basic templates provided by "dotnet new wpf".


This comment has been minimized.

KelsonBall commented Dec 6, 2018

Thanks everyone - using the dotnet new wpf command has been working for me.

@KelsonBall KelsonBall closed this Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment