Help with Shared AssemblyInfo.cs and global attributes

F

Fred Iannon

All,
I am trying to figure out a clean solution to the
following issues:

(1) - We have a number of dlls/exes that need to have
the same "values" for the various assembly attributes
(like AssemblyProduct, AssemblyCompany, AssemblyCopyright,
etc.) I would like to define these values in one place
and then "use" those values in every dll/exes'
AssemblyInfo.cs. In C++ I would have probably done this
with a #define :) Not sure of the best way to do this in
C#....I would hate to have to copy a new file/values to
each exe/dll, but I need those values to show up when you
right click on the file and choose properties...

(2) - Is there any way to define custom global
attributes WHICH WILL SHOW UP when you right click the
filename, choose properties, and then look under
the "Version" tab in the "Other version Info" listbox? I
would like to be able to add some of my own info there
(like database version, etc.) This is similar to how
the "Company" or "Comments" values are currently displayed

Thanks for any help,
Fred
 
D

David Browne

Fred Iannon said:
All,
I am trying to figure out a clean solution to the
following issues:

(1) - We have a number of dlls/exes that need to have
the same "values" for the various assembly attributes
(like AssemblyProduct, AssemblyCompany, AssemblyCopyright,
etc.) I would like to define these values in one place
and then "use" those values in every dll/exes'
AssemblyInfo.cs. In C++ I would have probably done this
with a #define :) Not sure of the best way to do this in
C#....I would hate to have to copy a new file/values to
each exe/dll, but I need those values to show up when you
right click on the file and choose properties...

(2) - Is there any way to define custom global
attributes WHICH WILL SHOW UP when you right click the
filename, choose properties, and then look under
the "Version" tab in the "Other version Info" listbox? I
would like to be able to add some of my own info there
(like database version, etc.) This is similar to how
the "Company" or "Comments" values are currently displayed

Multiple projects can share the same source file. Just put it in a common
location and add it to the project using Add>Existing Item>Link (it's a
toggle under the Open button).

So just share a file called SharedAssemblyInfo.cs among all the projects and
put the shared attribute declarations there.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top