Skip to content

Instantly share code, notes, and snippets.

@fushnisoft
Last active June 12, 2019 14:59
Show Gist options
  • Save fushnisoft/5772134 to your computer and use it in GitHub Desktop.
Save fushnisoft/5772134 to your computer and use it in GitHub Desktop.
msbuild example for Clarion

msbuild example for Clarion

This is an example of how to build a Clarion multi dll project from the command line. This was useful to be able to correctly build a multi-dll project containing circular references.


The BAT file

There are two calls so everything gets compiled. Output is piped to log files for later reference

%windir%\Microsoft.NET\Framework\v2.0.50727\MSBuild master.msbuild /p:ClarionBinPath="c:\Clarion8\bin" /p:NoDependency="true" /p:Configuration="Release" /p:CopyCoreFiles="true" /target:First > build_first.log
%windir%\Microsoft.NET\Framework\v2.0.50727\MSBuild master.msbuild /p:ClarionBinPath="c:\Clarion8\bin" /p:NoDependency="true" /p:Configuration="Release" /p:CopyCoreFiles="true" /target:Second > build_second.log

contents of master.msbuild:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Circular"  
  xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ItemGroup>
        <FirstPass Include="global.cwproj;
  	manager.cwproj;
		sec.cwproj;
		integration.cwproj;
		utils.cwproj;
		scheduler.cwproj;
		reports.cwproj;
		settings.cwproj;
		import.cwproj;
		orders.cwproj;
		quotes.cwproj;
		products.cwproj;
		servicemgr.cwproj;
		knowledgetree.cwproj;
		crm.cwproj;
		"/>
    </ItemGroup>
    <ItemGroup>
        <SecondPass Include="integration.cwproj;
        	quotes.cwproj;
		orders.cwproj;
		servicemgr.cwproj;
		master.cwproj;
		"/>
    </ItemGroup>
    <Target Name="First">
        <MSBuild Projects="@(FirstPass)"  
          Targets="Build" ContinueOnError="true" />  
    </Target>
    <Target Name="Second">
        <MSBuild Projects="@(SecondPass)"  
          Targets="Build" ContinueOnError="true" />  
    </Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment