c#, MSBuild Bootstrapper with wix, how to download .net framework 3.5 SP1?

妖精的绣舞 提交于 2019-12-21 17:24:40

问题


I managed to create bootstrapper for my project that includes .net framework 3.5SP1 with this code:

  <ItemGroup>  
    <BootstrapperFile Include="Microsoft.Net.Framework.3.5.SP1">  
        <Visible>False</Visible>  
        <ProductName>.NET Framework 3.5.SP1</ProductName>  
        <Install>true</Install>  
      </BootstrapperFile>        
    </ItemGroup>  
    <Target Name="Bootstrapper">  
      <GenerateBootstrapper  
        ApplicationFile="SeppelSetup.msi"  
        ApplicationName="Seppel 1.0"  
        BootstrapperItems="@(BootstrapperFile)"  
        OutputPath=".\bin\Debug"  
        ComponentsLocation="Relative"  
        Culture="en"  
        Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper"  
      />  
    </Target>

The problem is that output directory has over 200Mb, wich is much more than I can afford (I want to put installer online for download). Is there a way that allow me to download framework from microsoft's site rather than include all files in installation package?


回答1:


From the Bootstrapper element Remove your ComponentsLocation="Relative" attribute and add following

ComponentsLocation="Homesite"

CopyComponents="true"




回答2:


Your best option is probably to use Wix 3.6. It was nowhere near complete the last time I tried it, but it supports exactly the sort of thing you want, downloading redistributables from the Internet. If you're willing to wait for it to be stable, go with it.



来源:https://stackoverflow.com/questions/5862060/c-msbuild-bootstrapper-with-wix-how-to-download-net-framework-3-5-sp1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!