assemblyinfo

What are the best practices for using Assembly Attributes?

I have a solution with multiple project. I am trying to optimize AssemblyInfo.cs files by linking one solution wide assembly info file. What are the best practices for doing this? Which attributes should be in solution wide file and which are project/assembly specific? Edit: If you are interested there is a follow up question What are...

Can I automatically increment the file build version when using Visual Studio?

I was just wondering how I could automatically increment build (and version?) of my files when using Visual Studio (2005). If I look up the properties of say C:\Windows\notepad.exe, the Version tab gives "File version: 5.1.2600.2180". I would like to get these cool numbers in the version of my dll's too, not version 1.0.0.0, which let'...

How to add Assembly Information to a Web Site/App in Visual Studio 2008

Hello, Can anyone tell me how to add an AssemblyInfo.vb file to a Web Application converted from NET2.0 to NET3.5. I'd like to add the manifest information but cannot find a way to do for the Web Application's compiled DLL. I am using Web Deployment Projects for Visual Studio 2008 if this makes a difference. I'm also going to be repla...

Assembly Versioning using CruiseControl.net

Hi, I have setup CruiseControl.net for a bunch of my projects which are related. As a result a single project tag in CruiseControl has multiple SVN checkouts and then a bunch of msbuild tasks compile all the individual sln files. I need to update the assembly version of all the solutions when this build is being done. However, since ...

Regenerate missing AssemblyInfo.cs in VS 2005

I'm trying to build a small VS 2005 solution I've just checked out of source control, and I'm getting this easy to understand error: ...\AssemblyInfo.cs' could not be opened ('The system cannot find the file specified. ') (The file is fairly obviously missing) Because this file's automatically generated, I've never paid it mu...

How do you manage an AssemblyInfo.cs that is stored in SVN and changes with each build

I've got the following scenario: An application is built via the IDE and via a build script. The build script is used for the initial setup (fetching dependencies, setting up environment), to generate the binaries and for the continuous integration process. I want the binaries to have as an AssemblyFileVersion the month and day on build,...

C# AssemblyFileVersion usage within a program

I'm working on a program, and I'm trying to display the assembly FILE version public static string Version { get { Assembly asm = Assembly.GetExecutingAssembly(); FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(asm.Location); return String.Format("{0}.{1}", fvi.FileMajorP...

Log4NET setting overwritten by AssemblyInfo Task

I have a project that uses log4net and works fine on the developer machines. When we build, a step in our build scripts calls the AssemblyInfo task to set version numbers and dates, etc. But the AssemblyInfo file also loses the line: [assembly: XmlConfigurator(Watch = true)] Is there any way to have the AssemblyInfo task not overwri...

Is there a way to display less than 4 numbers in the assembly version?

I need to display only 3 numbers for my assembly versions, to comply with our internal guidelines I tried removing the last digit from the AssemblyInfo file to look like this [assembly: AssemblyVersion("0.5.0")] [assembly: AssemblyFileVersion("0.5.0")] And I display it like this Assembly.GetExecutingAssembly().GetName().Version.ToSt...

Is AssemblyInfo.cpp necessary?

I want to remove AssemblyInfo.cpp, because of some metadata errors that sometimes come up. Is AssemblyInfo.cpp useful for anything? Or can it be removed without any problem? ...

"LNK2022: metadata operation failed" driving me insane

I have a big solution with lots of projects, using VS2008 SP1, and at least once a day I encounter the LNK2022 error. If I do a full rebuild of the solution it builds fine, but this is not fun. It happens when a dependent DLL is changed 'insignificantly' (i.e. without changing any methods or classes), and the referencing project is late...

Should AssemblyInfo.cs be placed in version control?

I have an automated build system using CruiseControl. I am using the SvnRevisionLabeller to to get the version string to use. With this string I can use nant to update AssemblyInfo.cs so when I build it has the correct build string. I can also use this CC label to tag the subversion repository. So everything is aligned - CCNet Build la...

How to update assmebly version info with new build and revision during build?

I have to update the build number in assembly version of assemblyinfo.cs file. I have written a custom tasks which updates all the assmeblyinfo.cs under a solution before starting build. But when i change this file and try to build then some of my dlls which has reference of other dlls not able to compile as they dont find the specific v...

What is the ThemeInfo attribute for?

Whenever I create a new WPF application or WPF user control library, the AssemblyInfo.cs file includes the following attribute: [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dicti...

Is there an equivelant to 'AssemblyInfo.cs' in a Win32 DLL project?

I already looked at this topic, but I need the answer flipped around. How would I set the assembly information attributes* in a Win32 DLL? ...

Is it possible to change the version format of a C# project?

Instead of the major.minor.build.revision format, I'd like to use date and time for version numbers. Something more like day.month.year.time. Is there a way to change the format of the AssemblyVersion attribute in AssemblyInfo.cs? ...

Now Log4Net.config isn't being loaded as I moved my wrapper class to its own class project

Hi there, Can anyone help, i have been using log4net with success i basically had a static class (wrapper) in my webproject and i load my config from external file called log4net.config by adding this in assemblyinfo.cs // log4net config file [assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log4Net.config", Watch = true)...

VS.net set version for multiple projects in one solution

I am trying to update a lot of different projects in a solution to have a new version number. Is there a simple way to synchronize the version number across all projects fileversion and clickonce options? ...

Access solutioninfo.cs and assemblyinfo.cs from within .csproj

I need to access some information from my solutioninfo.cs and assemblyinfo.cs within my .csproj file and use it as a property. use the value of // my solutioninfo.cs [assembly: AssemblyCompany("MyCompany")] in my csproj: // my .csproj <PublisherName>MyCompany</PublisherName> Is there a way to access the values? ...

Where to specify version number in ASP.NET Web Site

So I have an ASP.NET 'Web Site' (as opposed to a Web Application) which has no AssemblyInfo.cs file or Bin folder or anything like that. I want to have a way to specify an Assembly version number (e.g. 7.0.2.0). In a Web Application you would do this in an AssemblyInfo.cs file. I've tried adding a Properties folder with an AssemblyInfo...