Microsoft.com
All DevCenters
MSDN Home
MSDN Code Gallery:
Code Gallery Home
|
Browse Gallery
|
Share Code
|
Help and FAQs
AssemblyInfo Task version 1.0.51130.0
Home
Downloads
Discussions
Issue Tracker
People
License
Close
RSS
All Resource Updates
Discussions
Issue Tracker
Releases
Wiki
RSS
Comments
|
Print
|
Page Info
|
Change History (all pages)
Search Wiki:
Home
This updated version includes fully-signed binaries, an updated installer to support non-admin installs, and support for Visual J# projects.
Last edited
Jun 20 2007 at 5:52 PM
by
neile
, version 1
Comments
learnerplates
wrote
Apr 16 2008 at 1:25 PM
Hi, This tool looks good but I've just tried it and gotten a compiler error
Error 2 Error emitting 'System.Reflection.AssemblyVersionAttribute' attribute -- 'The version specified '1.0.080416.01' is invalid' C:\Documents and Settings\nfallon\My Documents\Visual Studio 2005\Projects\VersionUpdateTest\VersionUpdateTest\Properties\AssemblyInfo.cs 34 12 VersionUpdateTest
The AssemblyInfo.cs has
[assembly: AssemblyVersion("1.0.080416.02")]
[assembly: AssemblyFileVersion("1.0.080416.02")]
Your task assembly is in the GAC.
AlSki
wrote
Apr 22 2008 at 9:19 AM
Hmmm. I don't think that the 3 part of the version string is capable of holding such a large number. I've never seen more than 5 digits in there before, I also belive it is a number not a string so the leading zero is likely to be strippped.
Instead of using a date I would suggest you use the more common number of days since...
Assaf
wrote
Jul 10 2008 at 6:42 PM
Can You have the version in a link assembly file (with a different name)?
overslacked
wrote
Nov 18 2008 at 9:58 PM
Any chance you'll change the licensing? I'm looking for tools to automate my build process and something like this sounds very useful, but it's a commercial project.
MartinHyldahl
wrote
Nov 20 2008 at 1:55 PM
Learnerplates, you are experiencing the y2k7 problem with version numbers. Version number parts is limited to 65535, so the AssemblyInfo task default for build number part (yyMMdd) will not work.
CommonGenius
wrote
Nov 28 2008 at 7:15 PM
I too would like to use this task in a commercial project. What is the point of releasing this under a non-commercial license? Is there any chance the license can be changed?
danmose
wrote
Dec 9 2008 at 11:01 PM
I don't know why the license got changed to non-commercial. I am trying to find out if I can change it back.
Dan [MSFT]
msbuild@microsoft.com
danmose
wrote
Dec 11 2008 at 12:47 AM
The license has now been changed back.
By the way, there is currently nobody contributing to this project. If anyone would like rights to improve the source code, please let me know.
jasper22
wrote
Feb 26 2009 at 1:34 PM
Why 'Subversion fix' doesn't come in standard package ???
Here is the fix: http://www.andrewconnell.com/blog/archive/2006/08/29/4078.aspx (this is not my blog)
learnerplates
wrote
Mar 9 2009 at 12:34 PM
nearly 1 year later I back to this task and it still doesn't work.
I'm trying to follow the instructions on msdn , http://msdn.microsoft.com/en-us/library/bb668945.aspx#_How_to_Modify
There's an msbuild code snippet in there which says that there is a task included in the AssemblyInfo task named "ConvertTFSBuildNumberToSolutionBuildNumber" which is supposed to fix the asebmyl numer issue, it doesn't exists.
It also mentions a task "RewriteFileVersions", this doesn't exist either, anyone??????
<Target Name="BuildNumberOverrideTarget">
<Message Importance="High" Text="$(BuildNumber)" />
<ConvertTFSBuildNumberToSolutionBuildNumber
MajorAndMinorVersion="1.0"
TFSBuildNumber="$(BuildNumber)"
TFSLastBuildNumber="$(LastBuildNumber)">
<Output TaskParameter="SolutionBuildNumber" PropertyName="SolutionBuildNumber" />
<Output TaskParameter="TFSBuildNumber" PropertyName="BuildNumber" />
</ConvertTFSBuildNumberToSolutionBuildNumber>
<Message Importance="High" Text="$(SolutionBuildNumber)" />
<Message Importance="High" Text="$(BuildNumber)" />
</Target>
<Target Name="BeforeCompile">
<Message Importance="High" Text="$(SolutionBuildNumber)" />
<CreateItem Include="$(SolutionRoot)\**\AssemblyInfo.cs">
<Output TaskParameter="Include" ItemName="AssemblyInfoFiles"/>
</CreateItem>
<CreateItem Include="$(SolutionRoot)\**\AssemblyInfo.vb">
<Output TaskParameter="Include" ItemName="AssemblyInfoFiles"/>
</CreateItem>
<RewriteFileVersions
AssemblyInfoFiles="@(AssemblyInfoFiles)"
AssemblyVersionNumber="$(SolutionBuildNumber)"
AssemblyFileVersionNumber="$(SolutionBuildNumber)"
AssemblyInformationalVersionNumber="$(SolutionBuildNumber)" />
</Target>
cosmos
wrote
Aug 24 2009 at 2:07 PM
Hello,
I have used this used this tool but one problem remaining.
My assembly version is updated on TFS after the build so I have always the previous version of the build number.
Could you help me ?
This is my TFSBuild.proj
<PropertyGroup>
<!-- Assembly version properties. Add others here -->
<AssemblyMajorVersion>1</AssemblyMajorVersion>
<!-- TF.exe -->
<TF>"$(TeamBuildRefPath)\..\tf.exe"</TF>
<!-- AssemblyInfo file spec -->
<AssemblyInfoSpec>AssemblyInfo.cs</AssemblyInfoSpec>
</PropertyGroup>
<!-- Set this to non-existent file to force rebuild. -->
<ItemGroup>
<IntermediateAssembly Include="$(SolutionRoot)\foobar.dll"/>
</ItemGroup>
..
...
<Target Name="AfterGet" Condition="'$(IsDesktopBuild)'!='true'">
<!-- Set the AssemblyInfoFiles items dynamically -->
<CreateItem Include="$(SolutionRoot)\**\$(AssemblyInfoSpec)">
<Output ItemName="AssemblyInfoFiles" TaskParameter="Include" />
</CreateItem>
<Exec WorkingDirectory="$(SolutionRoot)"
Command="$(TF) checkout /recursive $(AssemblyInfoSpec)"/>
</Target>
<Target Name="AfterCompile" Condition="'$(IsDesktopBuild)'!='true'">
<Exec WorkingDirectory="$(SolutionRoot)"
Command="$(TF) checkin /comment:"Auto-Build: Version Update" /noprompt /override:"Auto-Build: Version Update" /recursive $(AssemblyInfoSpec)"/>
</Target>
<!-- In case of Build failure, the AfterCompile target is not executed. Undo the changes -->
<Target Name="BeforeOnBuildBreak" Condition="'$(IsDesktopBuild)'!='true'">
<Exec WorkingDirectory="$(SolutionRoot)"
Command="$(TF) undo /noprompt /recursive $(AssemblyInfoSpec)"/>
</Target>
Thank you
mikefourie
wrote
Nov 7 2009 at 12:31 PM
Hi
This task is now maintained in the MSBuild Extension Pack. Please log an issue there if you are still having a problem. http://www.msbuildextensionpack.com/
thanks
Mike
Sign in to add a comment
Current Release
AssemblyInfo Task vers...
Wed Jun 20 2007 at 5:52 PM
More Tags ...
Popular Tags
.NET
.NET 2.0
.NET 3.0
.NET 3.5
.NET Framework
2008
2009
ADO.NET
ASP.NET
C#
C# 3.0
C++
CRM
Dynamics
Entity Framework
Hotfix
LINQ
LINQ to SQL
MCMS
MSCRM
MSDN Magazine
Placeholder Controls
Samples
SharePoint
silverlight
SQL Server
tfs
Tools
VB.NET
Visual Basic
Visual C#
Visual Studio
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
VS SDK
VSTO
VSX
WCF
Windows Forms
Windows Mobile
WPF
Manage Your Profile
Legal
Contact Us
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.
Terms of Use
Trademarks
Privacy Statement
Updating...