Я видел подобные вопросы, но, похоже, они мне не помогли.
Я играю с тестовым веб-приложением.
Я добавил это в свой RStp.wixproj, мне было нелегко, но он работает, он генерирует Frags.wxs:
<Target Name="BeforeBuild">
<Exec Command=" "$(WiX)bin\heat.exe" project "..\WebR\WebR.csproj" -cg Portals.Vendor -gg -pog Binaries -pog Content –configuration "release" -platform "AnyCPU" –out "Frags.wxs" " />
<ItemGroup>
<Compile Include="Frags.wxs" />
</ItemGroup>
</Target>
Мой Frags.wxs выглядит так:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="WebR.Binaries" />
</Fragment>
<Fragment>
<ComponentGroup Id="WebR.Binaries">
<ComponentRef Id="cmp7AE3B693619BAD570BB795DC740F74CA" />
</ComponentGroup>
</Fragment>
<Fragment>
<DirectoryRef Id="WebR.Content">
<Directory Id="dirBB5AA78A6132241A7A39F7899E66D36C" Name="Fold" />
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="WebR.Content">
<ComponentRef Id="cmp434BA57B5F42786DB41F7D30B9C8A2AA" />
<ComponentRef Id="cmp827A8854133966F2160835E612413FA7" />
<ComponentRef Id="cmpF279DD78D3B3BE5386C8535E2A85FC5F" />
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="Portals.Vendor">
<Component Id="cmp7AE3B693619BAD570BB795DC740F74CA" Directory="WebR.Binaries" Guid="{9F6BEFC1-6226-4C1D-A1B0-1C7D6355DB60}">
<File Id="filB23D27862A7D96131D5E2F7C7CCCAA8B" Source="$(var.WebR.TargetDir)\WebR.dll" />
</Component>
<Component Id="cmp434BA57B5F42786DB41F7D30B9C8A2AA" Directory="WebR.Content" Guid="{F0733DE8-9B04-4F65-ABA3-954B71E6CC00}">
<File Id="fil85B5BB89317EA74AFB68409ADF6BA4C7" Source="$(var.WebR.ProjectDir)\Default.aspx" />
</Component>
<Component Id="cmp827A8854133966F2160835E612413FA7" Directory="WebR.Content" Guid="{ADF5B995-9002-469F-BA2F-9A88621DAF13}">
<File Id="filFD9C307A451419BA8B1308C1786045D2" Source="$(var.WebR.ProjectDir)\Web.config" />
</Component>
<Component Id="cmpF279DD78D3B3BE5386C8535E2A85FC5F" Directory="dirBB5AA78A6132241A7A39F7899E66D36C" Guid="{8BFCFDD6-E995-482D-9AA3-4EE8926E9CB0}">
<File Id="filB2AF43969CEF48A8A2E362F2D8E5DD20" Source="$(var.WebR.ProjectDir)\Fold\F2.aspx" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
Я еще не вносил никаких изменений в Product.wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="RStp" Language="1033" Version="1.0.0.0" Manufacturer="Prive" UpgradeCode="cfbe56e5-e27a-42c3-af88-262956974943">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="RStp" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="RStp" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
</ComponentGroup>
</Fragment>
</Wix>
- Что мне нужно сделать, чтобы фасад A.R. находился внутри Frags.wxs?
- Как связать Frags.wxs с Product.wxs?
- Как исправить ошибку "Неопределенная переменная препроцессора" $ (var.WebR.TargetDir) 'ОБНОВЛЕНИЕ Щелкните правой кнопкой мыши RStp, добавьте ссылку, выберите Web prj - исправлено
- Куда мне добавить код свечи (например, RStp.wixproj для тепла?) И как он должен выглядеть?
- Если это будет безопасным исходным кодом, следует ли мне включать Frags.wxs в исходный код?
- Мне нужен конкретный путь для установки, который выглядит следующим образом: «E: \ Inetpub \ wwwroot», как я могу это настроить?
Спасибо