New tooling leaves a mess under obj, causing duplicate attribute problems
See original GitHub issueThe current dotnet build
tooling seems to leave files such as obj/{configuration}/{platform}/dotnet-compile.assemblyinfo.cs
. This can break some existing builds, for example in dapper we use out-of-project file references:
"compile": [
"../Dapper/**/*.cs"
],
This worked fine previously, but now creates things like:
error CS0579: Duplicate 'System.Reflection.AssemblyInformationalVersionAttribute' attribute
(because of course it finds the file for each platform and/or configuration)
We can fix this by adding:
"compileExclude": [
"../Dapper/obj/"
],
But; this seems pretty horrible. I’m not saying the setup is perfect here, but it seems like maybe the tooling should default to ignoring files that it almost certainly created (for a different purpose, and unless it knows that it really wants it for what it is currently doing). Or alternatively: don’t leave such things behind ;p
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (4 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 >CS0579 Duplicate Attribute Error with .NET Core
The error is a result of the build process generating AssemblyInfo. cs files in each project obj directory. This file exists to provide...
Read more >Ten Common Database Design Mistakes - Simple Talk
If database design is done right, then the development, deployment and subsequent performance in production will give little trouble.
Read more >Refactoring: This class is too large - Martin Fowler
This article is about tackling the first problem in the above list: ... code contains the most duplication, and is causing the most...
Read more >Repair Geometry (Data Management) - ArcGIS Pro Resources
ArcGIS geoprocessing tool that inspects features for geometry problems and repairs them.
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 Free
Top 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
This is still a problem in RTM (Preview 2 tooling).
This is still a problem in RC2.