zz74b Posted March 12, 2011 Report Share Posted March 12, 2011 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 More sharing options...
psantosl Posted March 13, 2011 Report Share Posted March 13, 2011 Right now the best way will be running (and parsing, not much to do) a cm status command. I'm pretty sure we solved something very similar on the forum for NAnt, I'll take a look and let you know. Link to comment Share on other sites More sharing options...
zz74b Posted March 14, 2011 Author Report Share Posted March 14, 2011 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 More sharing options...
psantosl Posted March 14, 2011 Report Share Posted March 14, 2011 Nice suggestion! Right now, here's the output of a cm status: >cm status cs:30614@rep:codice@repserver:localhost:6060 Not much to parse as you can see... Link to comment Share on other sites More sharing options...
mvdzwaan Posted March 23, 2011 Report Share Posted March 23, 2011 PM me for a PlasticWCREV utility (alpha version) which we use to replace SubWCRev integration in our build proces Link to comment Share on other sites More sharing options...
Olaf Kober Posted March 23, 2011 Report Share Posted March 23, 2011 If you like, I can send you the C# source code for a custom MSBuild tasks project that parses the workspace status output and contains other MSBuild tasks for creating and applying labels. Link to comment Share on other sites More sharing options...
gweronimo Posted October 7, 2015 Report Share Posted October 7, 2015 NOTE: C# source code for a similar PlasticWcRev tool is published in this blog post: http://codicesoftware.blogspot.com/2015/09/moving-from-svn-to-plastic-scm-how-we.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.