1

I would like to know if it's possible to edit information in an assembly ? For example, I would like to change the AssemblyTitle of my assembly after the build.

[assembly: AssemblyTitle("xxxxx")]
[assembly: AssemblyDescription("yyyyy")]

First, I thought to edit the AssemblyInfo.cs but I use TFS and the file is checked-in (read only) so I can't edit the file.

Thanks by advance for your answer.

Jens Björnhager
  • 5,632
  • 3
  • 27
  • 47

2 Answers2

0

The stock AssemblyInfo.cs file contains defaults for such values. You could change them in there. However, there's nothing preventing you from creating another file that provides those assembly attributes. We use this to provide a shared attribute set for company wide settings (e.g. company name, copyright statement) that's linked to a single location in source control for easy global update. As long as you can add such a file to the project you can apply the attributes. Though some can not exist more than once.

You could include an additional file in the project but not have it actually exist on disk or source control (create it in VS then just delete grime disk or simply exclude from TFS checkin). Essentially it would show up as a missing project file in visual studio. Then create a pre-build task that generates/overwrites the file with the desired assembly attributes. Once it's there visual studio will include it in the compile.

Peter
  • 1,488
  • 2
  • 17
  • 23
0

you can modify in this file AssemblyInfo.cs

Or in the property project

enter image description here

Aghilas Yakoub
  • 28,516
  • 5
  • 46
  • 51