How to create a msi file for a Visual Studio 2010 solution w/o Visual Studio 2010?

ぐ巨炮叔叔 提交于 2019-12-01 12:57:55

问题


We have an old Visual Studio 2010 windows forms application, inside it has a Setup project to create the msi file. This is the command we call in Jenkins:

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com" "%WORKSAPCE%\RepoManager-v3-TIB3-dev\RepoManager.sln" /build "Release|x86"

Now we only have VS 2013 installed on the build server. We can build the solution using 2013 like this, but the msi file is not created. We know it's no longer supported.

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" RepoManager.sln" /build "Release|x86"

My situation is we don't have the resource to migrate the whole solution to 2013, it's big. So what's the best way for us to create the msi file?

[Added in June 17] Following PhilDW's suggestion, I installed the Installer Project extension to 2013, it shows as "Visual Studio Installer Extension for Microsoft Visual Studio 2013" in the Programs and Features (How to find it in the file system? Where it's installed to?) Now I got this error in the build, and the msi file is still not generated.

------ Starting pre-build validation for project 'Setup2.0_Prod' ------ 
ERROR: An error occurred while validating.  HRESULT = '8000000A'
------ Pre-build validation for project 'Setup2.0_Prod' completed ------
15>------ Build started: Project: Setup2.0_Prod, Configuration: Release ------


回答1:


Setup projects ARE supported in VS 2013 and 2015. Did you install the installer add-in?

https://visualstudiogallery.msdn.microsoft.com/f1cc3f3e-c300-40a7-8797-c509fb8933b9

And there is a 2013 installer version of the add-in, so maybe that's all you need.

https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d

There is no requirement that code generated with some version of Visual Studio must be installed with a setup project of the same Visual Studio version. MSI setups don't care where the files are from, so you can probably use VS 2010, VS 2013 or VS 2015 installer project add-in to build an MSI setup. Your post says that the MSI file isn't created with your VS 2013 build so there are two possible answers:

  1. Your setup isn't marked to build when the solution builds - the default appears to be that the setup projects don't build by default.

  2. You haven't installed the installer projects add-on to your VS 2013 setup.




回答2:


Finally I figured out, the easiest solution is: 1. Install the extension to VS 2013. 2. Add the registry key: An error occurred while validating. HRESULT = '8000000A'



来源:https://stackoverflow.com/questions/37845705/how-to-create-a-msi-file-for-a-visual-studio-2010-solution-w-o-visual-studio-201

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