Msbuild 在PostBuildEvent之前运行引导程序
我有一个WiX安装程序项目,如果需要,有一个引导程序任务来安装.NET。但是,它似乎是在PostBuildEvent之后运行的,我需要它在它之前运行 有人能解释一下吗 有关守则如下:Msbuild 在PostBuildEvent之前运行引导程序,msbuild,wix,Msbuild,Wix,我有一个WiX安装程序项目,如果需要,有一个引导程序任务来安装.NET。但是,它似乎是在PostBuildEvent之后运行的,我需要它在它之前运行 有人能解释一下吗 有关守则如下: <ItemGroup> <BootstrapperFile Include=".NETFramework,Version=v4.0,Profile=Client"> <ProductName>.NET Framework 4.0 Client</Pr
<ItemGroup>
<BootstrapperFile Include=".NETFramework,Version=v4.0,Profile=Client">
<ProductName>.NET Framework 4.0 Client</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.4.5">
<ProductName>Windows Installer 4.5</ProductName>
</BootstrapperFile>
</ItemGroup>
<Target Name="Bootstrapper" Inputs="$(OutDir)$(TargetFileName)" Outputs="$(OutDir)\Setup.exe" Condition=" '$(OutputType)'=='package' ">
<GenerateBootstrapper Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper" ApplicationName="EcoButton" ApplicationFile="$(TargetFileName)" BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="HomeSite" OutputPath="$(OutputPath)" />
</Target>
<PropertyGroup>
<BuildDependsOn>$(BuildDependsOn);Bootstrapper</BuildDependsOn>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>cscript "$(ProjectDir)..\EditMsi.vbs" "$(Configuration)" "$(TargetPath)"
cscript "$(ProjectDir)..\BuildSetup.vbs" "1" "$(Configuration)" "$(TargetPath)"
cscript "$(ProjectDir)..\BuildSetup.vbs" "2" "$(Configuration)" "$(TargetPath)"</PostBuildEvent>
</PropertyGroup>
这就成功了
<Target Name="AfterBuild">
<CallTarget Targets="AfterBuild1" />
<CallTarget Targets="AfterBuild2" />
<CallTarget Targets="AfterBuild3" />
<CallTarget Targets="AfterBuild4" />
</Target>
<Target Name="AfterBuild1" Inputs="$(OutDir)$(TargetFileName)" Outputs="$(OutDir)\Setup.exe" Condition=" '$(OutputType)'=='package' ">
<GenerateBootstrapper Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper" ApplicationName="EcoButton" ApplicationFile="$(TargetFileName)" BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="HomeSite" OutputPath="$(OutputPath)" />
</Target>
<Target Name="AfterBuild2">
<Exec Command="cscript "$(ProjectDir)..\EditMsi.vbs" "$(Configuration)" "$(TargetPath)"" />
</Target>
<Target Name="AfterBuild3">
<Exec Command="cscript "$(ProjectDir)..\BuildSetup.vbs" "1" "$(Configuration)" "$(TargetPath)"" />
</Target>
<Target Name="AfterBuild4">
<Exec Command="cscript "$(ProjectDir)..\BuildSetup.vbs" "2" "$(Configuration)" "$(TargetPath)"" />
</Target>