SimpleStubs/test/TestClassLibraryTest/Etg.SimpleStubs.targets

25 строки
1.4 KiB
XML

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SimpleStubsCodeGenBeforeTargets>CoreCompile;XamlPreCompile</SimpleStubsCodeGenBeforeTargets>
<SimpleStubsCodeGenDependsOnTargets>ResolveReferences</SimpleStubsCodeGenDependsOnTargets>
<SimpleStubsCodeGenOutput Condition="'$(SimpleStubsCodeGenOutput)' == ''">$(IntermediateOutputPath)SimpleStubs.generated.cs</SimpleStubsCodeGenOutput>
<GenerateSimpleStubs Condition="'$(GenerateSimpleStubs)'==''">true</GenerateSimpleStubs>
</PropertyGroup>
<!-- Don't generate code for design-time builds: '$(DesignTimeBuild)' != 'true' OR '$(BuildingProject)' == 'true' -->
<Target Name="SimpleStubsCodeGen"
BeforeTargets="$(SimpleStubsCodeGenBeforeTargets)"
DependsOnTargets="$(SimpleStubsCodeGenDependsOnTargets)"
Condition="('$(DesignTimeBuild)' != 'true' OR '$(BuildingProject)' == 'true') AND '$(GenerateSimpleStubs)'=='true'">
<Exec
WorkingDirectory="$(ProjectDir)"
Command="..\..\src\SimpleStubs.CodeGen\bin\$(ConfigurationName)\Etg.SimpleStubs.CodeGen.exe -ProjectPath:&quot;$(ProjectDir)$(ProjectName).csproj'&quot; -OutputPath:&quot;$(SimpleStubsCodeGenOutput)&quot; -Configuration:&quot;$(Configuration)&quot; -Platform:&quot;$(Platform)&quot; -VisualStudioVersion:&quot;$(VisualStudioVersion)&quot;" />
<ItemGroup>
<Compile Include="$(SimpleStubsCodeGenOutput)" />
</ItemGroup>
</Target>
</Project>