Created
June 10, 2014 06:03
-
-
Save tfwio/740f4800c227b42493d7 to your computer and use it in GitHub Desktop.
SvnInfo MSBuild ingegration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
// Information about this assembly is defined by the following | |
// attributes. | |
// | |
// change them to the information which is associated with the assembly | |
// you compile. | |
[assembly: AssemblyTitle("[app_name_here]")] | |
[assembly: AssemblyDescription("Revision #$WCREV$")] | |
[assembly: AssemblyConfiguration("")] | |
[assembly: AssemblyCompany("[app_copyright_info]")] | |
[assembly: AssemblyProduct("[product_name]")] | |
[assembly: AssemblyCopyright("[product_copy]")] | |
[assembly: AssemblyTrademark("[product_trademark]")] | |
[assembly: AssemblyCulture("")] | |
// This sets the default COM visibility of types in the assembly to invisible. | |
// If you need to expose a type to COM, use [ComVisible(true)] on that type. | |
[assembly: ComVisible(false)] | |
// The assembly version has following format : | |
// | |
// Major.Minor.Build.Revision | |
// | |
// You can specify all values by your own or you can build default build and revision | |
// numbers with the '*' character (the default): | |
// we assert the SVN_REVISION into the Revision portion here | |
// for some reason I had placed a zero before the revision number | |
// so that there were four digits for a revision like '124' to read '0124'. | |
[assembly: AssemblyVersion("1.0.0.$WCREV$")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set mpath=%windir%\microsoft.net\framework\v4.0.30319; | |
set path=%mpath%;%path% | |
set msb=%mpath%\msbuild | |
msbuild svninfo.proj /t:build | |
pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTarget="Build"> | |
<PropertyGroup> | |
<ProjectDir Condition=" '$(ProjectDir)' == '' ">$(MSBuildProjectDirectory)</ProjectDir> | |
<SvnToolPath>C:\Program Files\TortoiseSVN\bin</SvnToolPath> | |
<SvnInfo>$(SvnToolPath)\SubWCRev</SvnInfo> | |
<PropertiesFile>$(ProjectDir)\Properties\AssemblyInfo.cs</PropertiesFile> | |
<PropertiesTemplate>$(PropertiesFile).tpl</PropertiesTemplate> | |
</PropertyGroup> | |
<Target Name="Build"> | |
<Exec Command=""$(SvnInfo)" "$(ProjectDir)" "$(PropertiesTemplate)" "$(PropertiesFile)" -f" /> | |
</Target> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment