Visual Studio 2012 Windows服务.vdproj项目迁移 [英] Visual Studio 2012 Windows service .vdproj project migration

查看:164
本文介绍了Visual Studio 2012 Windows服务.vdproj项目迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将解决方案移至Visual Studio 2012,项目类型之一是.vdproj.

根据此链接在Visual Studio 2012中不支持此项目类型: MSDN说,他们建议您对Visual Studio使用 InstallShield 限量版.

问题是,当我在VS2012中打开解决方案并尝试向解决方案中添加新的"Enable InstallShield Limited Edition"项目时,出现一条错误消息:

创建项目测试" ...项目创建失败.

为什么不能将这种类型的项目添加到我的解决方案中?

如果我制作了一个新的空解决方案,那么我也无法在其中创建一个InstallShield项目.

我将尝试下载 InstallShield限量版,看看它是否有作用.

我尝试了InstallShield下载,它添加了两个额外的项目类型,但是我无法创建它们中的任何一个.我可以将普通的网站项目添加到我的解决方案中,但不能将其添加到部署项目中.

安装程序的名称与此相同,但是此提示促使我重新启动.重新启动后,我可以添加一个InstallShield项目,但是可以在自己的解决方案中创建它.因此,现在看来我必须弄清楚如何使用它,我会很好的.

似乎限量版不支持安装Windows服务.

解决方案

这可能会很长而且很无聊,因为有很多步骤,但是我想写一下如何从Windows服务安装程序.vdproj移至Visual Studio 2012中提供了新的InstallShield LE.

步骤1:创建合并模块(.msm)

请遵循本指南的步骤.. >

注意:

这是我的isWix文件视图:

完成指南后,您应该有一个空的.wxs文件,看起来像这样:

使用从此处提取的组件XML元素您应该最终得到一个如下所示的.wxs文件:

点击构建,您现在应该拥有一个.msm文件.

步骤2:将合并模块添加到InstallShield

  1. 通过向导设置基本的安装信息,例如公司和版本信息.
  2. 在ISLE中查找可再发行文件视图.右键单击列表,然后选择浏览模块.找到并添加模块后,右键单击模块并选择属性.将目标文件夹下拉菜单设置为INSTALLDIR.我必须将我的文件夹设置为我为安装路径创建的最低级别的文件夹,因此您可能需要尝试一下.
  3. 构建项目,并在虚拟机上进行测试

可分配资源屏幕

如果您收到有关路径太长的错误,则可能需要将发布位置更改为接近根目录的位置.

以下是所有构建错误的列表供参考.

现在,您应该可以运行安装程序,并安装/启动Windows服务.与.MSI文件相比,我们所做的工作要多得多,我们可以在Visual Studio 2010中生成该文件,但总体来说还不错.

I'm trying to move a solution I have over to Visual Studio 2012 and one of the project types is .vdproj.

According to this link this project type is not supported in Visual Studio 2012: MSDN says they recommend that you use InstallShield Limited Edition for Visual Studio.

The problem is, when I open up my solution in VS2012 and try to add a new "Enable InstallShield Limited Edition" project to my solution, I get an error message saying:

Creating project 'test'...project creation failed.

Why might I not be able to add a project of this type to my solution?

If I make a new empty solution I can't make an InstallShield project it in either.

I'm going to try to download InstallShield limited edition and see if it does anything.

I tried out that InstallShield download, and it added two extra project types, but I'm unable to create either of them. I'm able to add normal website projects to my solutions just fine, but not deployment projects.

The installer was named the same, but this one prompted me to re-start. After re-starting I was able to add an InstallShield project, but it gets created in its own solution. So, it looks like now I have to figure out how to use it, and I'll be good to go.

It's looking like the limited edition doesn't have support to install Windows services.

解决方案

This will probably be long and boring because there's lots of steps, but I'd like to write up how to move from a Windows service installer .vdproj to the new InstallShield LE that's available in Visual Studio 2012.

Step 1: Create a merge module (.msm)

Follow the steps of this guide.

Notes:

  • You will need to install WiX 3.6 and isWiX
  • The latest release of IsWiX doesn't enable the Tools menu item in Visual Studio 2012. Edit the file: C:\ProgramData\Microsoft\MSEnvShared\AddIns\IsWiXAddin.Addin (XML) and clone the HostApplication element and update 10.0 to 11.0.
  • In step #8 of the guide, it references a code tab. This has been moved to the XML Editor item in the bottom of the left menu
  • I left the MergeRedirectFolder empty for my installation

Here is my isWix files view:

After you're done with the guide you should have an empty .wxs file that looks something like this:

Using the Component XML element pulled from here you should end up with a .wxs file that looks like this:

Hit build and you should now have a .msm file.

Step 2: Adding merge module to InstallShield

  1. Go though the wizard to setup the basic install information like company and version information.
  2. Find the redistributables view in ISLE. Right click the list and select browse for module. After your module is found and added, right click the modules and select properties. Set the destination folder drop down to INSTALLDIR. I had to set mine to the lowest level folder I created for my install path, so you might have to experiment a bit.
  3. Build Project, and test on virtual machine

Redistributables Screen

If you're getting errors about the path being too long you might need to change the release location to something close to the root.

Here's a list of all the build errors for reference.

Now you should be able to run your installer and have it install/start a Windows service. A lot more work than .MSI files, we got it to generate in Visual Studio 2010, but overall it was not too bad.

这篇关于Visual Studio 2012 Windows服务.vdproj项目迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆