cme0more
cme0more

Reputation: 11

Problem getting version number from assembly file with msbuild

I'm working on msbuild to get version info from assembly file. But i got a problem that the value $(MaxAssemblyVersion) is always empty. The only difference here is that i got a .Net solution including several projects. So i have a GlobalAssemblyInfo.cs at the root folder and Assemblyinfo.cs inside every included project. Anyone has any suggestion for my situation? Is there any way to work with GlobalAssemblyinfo.cs?

Look forward to your reply! Every comment will be very helpful and appropriated.

Many thanks,

Upvotes: 1

Views: 655

Answers (1)

Snixtor
Snixtor

Reputation: 4307

Depending on what point during the build you need the assembly version, you could extract it from your outputs using the GetAssemblyIdentity Task.

Upvotes: 1

Related Questions