Visual Studio script project
1 answer
Good question, Don. You can create a new directory in your solution and place your script there. Then you will create an MSBuild script named MyProject.csproj as shown below:
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion = "4.0"
DefaultTargets = "Build"
xmlns = "http://schemas.microsoft.com/developer/msbuild/2003"
>
<ItemGroup>
<InputTxt Include="$(MSBuildProjectDirectory)\input.txt" />
<OutputTxt Include="$(MSBuildProjectDirectory)\output.txt" />
<Script Include="$(MSBuildProjectDirectory)\script.cmd" />
</ItemGroup>
<Target
Name = "Build"
Inputs = "@(InputTxt);@(Script)"
Outputs = "@(OutputTxt)"
>
<Exec Command = '"@(Script)" "@(InputTxt)" "@(OutputTxt)"' />
</Target>
</Project>
+2
source to share