我要创建我的应用程序一个安装的安装程序。我已经下载的WiX 3.6和它安装在VS 2012。
I want to create a setup installer for my application. I have downloaded WiX 3.6 and installed it on vs 2012.
返回设定项目
什么是错的?这是我的安装项目product.wxs
What is wrong? This is my setup project product.wxs
<?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="schemas.microsoft/wix/2006/wi"> <Product Id="*" Name="SetupProject1" Language="1033" Version="1.0.0.0" Manufacturer="Natiloos" UpgradeCode="cfc2f4dd-2da5-49e2-9099-96968d75aaa4"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MediaTemplate /> <Feature Id="ProductFeature" Title="SetupProject1" Level="1"> <ComponentGroupRef Id="ProductComponents" /> </Feature> </Product> <Fragment> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER" Name="SetupProject1" /> </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"> --> <!-- </Component> --> </ComponentGroup> </Fragment>
我怎样才能让安装程序正确建立?
How can I get the installer to build correctly?
推荐答案问题是您的安装不安装任何东西。添加您的项目作为安装程序的引用,并不意味着安装程序将包括您的项目输出。在您的安装项目有:
The problem is your installer is not installing anything. Adding your project as a reference to the installer does not mean the installer will include your projects output. In your setup project you have:
<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"> --> <!-- </Component> --> </ComponentGroup> </Fragment>您需要添加文件...即。取消注释<成分>< /成分> 标签和手动添加文件。这是很好的有一个<成分>每个文件标签
You need to add the files...i.e. uncomment the <Component></Component> tags and add your files manually. It's good to have one <Component> tag per file.
例如:
<Component Id="MyProgram.exe" Guid="PUT-GUID-HERE"> <File Id="MyProgram.exe" KeyPath="yes" Source="Path_To_Output_Folder\MyProgram.exe" /> </Component>更多推荐
WiX的安装程序不VS 2012上工作
发布评论