AssemblyInfo Configuration

Hi,

I created a solution with 3 projects related between each other. However, when these projects generate the AssemblyInfo file, the attributes become duplicated.

It’s easy to solve the problem disabling the assembly info generation and the target framework attribute generation using these properties in the .csproj file:

<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>

However, what if I would like these attributes generated? I have 3 files, this means 3 assemblies. What if I would like each one of these files to have its own properties, how could I avoid this duplication error?

I also noticed some of the attributes are generated as global, is there some way to change this and, in this way, solve the problem?

Under normal circumstances, having multiple projects should work just fine. Are all the projects in the same directory? Or are you customizing the location of temporary files (e.g. by setting BaseIntermediateOutputPath)?

If it’s neither of those, can you share a ZIP file that contains a solution that demonstrates the problem?

.NET Foundation Website | Blog | Projects | Code of Conduct