Jump to content

SVN 'Version' equivalent


zz74b

Recommended Posts

Hi

I'm trying to integrate Plastic SCM where originally I have used SVN. Within Visual Studio 2010 I use the MSBuildCommunityTasks to get the SVN Version of a directory to create the assembly version info. How can I go about doing the equivalent with Plastic?

Within the csproj file I have the following (using SVN)

<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" Condition="Exists('$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets')" />
 <PropertyGroup>
   <Major>1</Major>
   <Minor>0</Minor>
   <Build>$(BUILD_NUMBER)</Build>
   <Revision>0</Revision>
 </PropertyGroup>
 <Target Name="BeforeBuild">
   <SvnInfo RepositoryPath="$(MSBuildProjectDirectory)" ToolPath="C:\Program Files\SVN\bin">
     <Output TaskParameter="LastChangedRevision" PropertyName="Revision" />
   </SvnInfo>
   <Message Text="Version: $(Major).$(Minor).$(Build).$(Revision)" />
   <AssemblyInfo CodeLanguage="CS" OutputFile="Properties\AssemblyVersionInfo.cs" AssemblyVersion="$(Major).$(Minor).$(Build).$(Revision)" AssemblyFileVersion="$(Major).$(Minor).$(Build).$(Revision)" Condition="$(Revision) != 0" />
 </Target>

Thanks.

Link to comment
Share on other sites

Hi,

Ok this will be easy enough to write a small wrapper application round the cm command.

Is there some -xml option we can add to all the commands to output in an xml format rather than plain text? - this would help with parsing and future upgradability in output.

Cheers

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 years later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...