MSBuild multiple projects with a single assembly version

  • Thread starter Jonathan Kacprowicz
  • Start date
J

Jonathan Kacprowicz

I am trying to create a build process using MSBuild that will build my
multiple projects all with the same AssemblyVersion and
AssemblyFileVersion. I have tried using the AssemblyInfo task from the
community tasks projects (http://msbuildtasks.tigris.org/) and the
AssemblyInfoTask from the MSBuild blog
(http://www.gotdotnet.com/codegallery/codegallery.aspx?id=93d23e13-c653-4815-9e79-16107919f93e).

My scenario is this: I have several project files, each within their
own sub-directory. I want to have one MSBuild file that I can set the
version number manually and build. I want all the output DLLS to have
that version number and be placed into a single folder.

This has to be common in the community, but cannot find any
good/working examples.

Any help would be greatly appreciated.

Jonathan

On a side note, if anyone can show me how to get some property values
from the main MSBuild file, and some property values from each
individual project file, that would be great...but not my main concern.
 
M

Mathieu Cartoixa

Jonathan Kacprowicz a écrit :
I am trying to create a build process using MSBuild that will build my
multiple projects all with the same AssemblyVersion and
AssemblyFileVersion. I have tried using the AssemblyInfo task from the
community tasks projects (http://msbuildtasks.tigris.org/) and the
AssemblyInfoTask from the MSBuild blog
(http://www.gotdotnet.com/codegallery/codegallery.aspx?id=93d23e13-c653-4815-9e79-16107919f93e).

My scenario is this: I have several project files, each within their
own sub-directory. I want to have one MSBuild file that I can set the
version number manually and build. I want all the output DLLS to have
that version number and be placed into a single folder.

This has to be common in the community, but cannot find any
good/working examples.

Any help would be greatly appreciated.

Jonathan

On a side note, if anyone can show me how to get some property values
from the main MSBuild file, and some property values from each
individual project file, that would be great...but not my main concern.

Hi,

I am not a MSBuild specialist, but I think that VS2005 generates
MSBuild project files, right ? In VS, you can add an existing file to a
project the usual way, or as a link which is a good way to share the
same code across projects (like parts of AssemblyInfo attributes...).
It looks like this in one of my projects :
<Compile Include="..\Version.cs">
<Link>Properties\Version.cs</Link>
</Compile>

Hope this helps.

Mathieu
 
J

Jonathan Kacprowicz

Thank you so much. Such a simple answer. I can't believe I didn't
think of it.

JK
 
Joined
Jan 10, 2011
Messages
1
Reaction score
0
Hello,

It works fine when "Icon and manifest" is checked in application properties. But if I check "Resource file", it doesn't work anymore, the assembly and file version are kept void.

Does anyone know why ?
 

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