Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you call Slow Cheetah from the command line?

Can you call Slow Cheetah from the command line? I am looking to add a post build event to transform my config file for a variety of different environments.

Cheers Dee

like image 382
Damien McCauley Avatar asked Nov 18 '25 06:11

Damien McCauley


1 Answers

Step 1) Create a build file Transform.msbuild

<Project DefaultTargets="TransformConfiguration">
    <UsingTask TaskName="TransformXml"
             AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll"/>

    <Target Name="TransformConfiguration">
    <TransformXml Source="$(sourceConfig)"
                  Transform="$(valuesConfig)"
                  Destination="$(outputConfig)"/>
    </Target>
</Project>

Step 2) Call MsBuild

msbuild Transform.msbuild /p:sourceConfig="app.config" /p:valuesConfig="App.Production.config" /p:outputConfig="AppName.config"
like image 65
Andrew Avatar answered Nov 21 '25 09:11

Andrew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!