dotnet build3 complains about duplicate TF attributes.
See original GitHub issueSteps to reproduce
Install from https://dotnetcli.blob.core.windows.net/dotnet/Sdk/rel-1.0.0/latest.version dotnet new -t msbuild dotnet restore dotnet build3
Expected behavior
Successful build
Actual behavior
C:\Users\srivatsn\AppData\Local\Temp.NETCoreApp,Version=v1.0.AssemblyAttributes.cs(4,12): error CS0579: Duplicate ‘global::System.Runtime.Versioning.TargetFrameworkAttribute’ attribute [C:\Users\srivatsn\Downloads\dotnet-dev-win-x64.latest\test\test.csproj]
Looks like the TFAttribute is both in the generated assemblyinfo.cs in obj and the file mentioned in the error.
Environment data
dotnet --info
output:
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
VS 2017 Build Errors - Duplicate Attributes in AssemblyInfo ...
This happens because the new .NET tools automatically create the attributes and add them to the assembly, so they now appear twice in...
Read more >Dealing with Duplicate Assembly Attributes in .Net Core
When migrating a project from .Net Framework to .Net Standard, you may run into issues where you get duplicate assembly attributes.
Read more >OFFICIAL ZONING ORDINANCE I
ADXIXXSTRATIOiV' AND EITORCEME~~T OF ZONING THROUGHOUT. UNINCORPORATED LEE COUNTY; PROVIDING JUSTIPICATOXY. CLAUSES; PROVIDING FOR A TABLE OF CONTENTS; ...
Read more >qandamaster423.xml
... 2018-10-28 monthly https://www.chegg.com/homework-help/questions-and-answers/using-microsoft-visual-studio-2017-c-write-c-program-calculate-analyze-data ...
Read more >1768 Copy o
Constituent authorizes and empowers his said agent and attorney-in-fact for him and in his name to: Collect all money;;due, give receipts.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes removing the obj directory made the error go away.
@rainersigwald Agreed, I can’t repro this without having first run an ordinary
dotnet build
which generates under obj (even running build3 multiple times doesn’t break)I don’t think anything is wrong with @nguerrera 's assembly info generation.
Being that this issue is tracked in the linked msbuild issue, let’s close this out.