I am having issues with trying to create a Visual Studio Deployment Project via command prompt.
I have a visual studio 2015 installer I am trying to create, I am running the following command:
devenv.exe <SolutionName>.sln /Build "Release|Any CPU" /Project "<InstallerProjectName>.vbproj" /ProjectConfig "Release|Any CPU"
I also read that maybe the dependent projects need to be built as well, so I have also tried that as follows:
devenv.exe <SolutionName>.sln /Build "Release|Any CPU" /Project "<ProjectName>.vbproj" /ProjectConfig "Release|Any CPU" /Project "<InstallerProjectName>.vbproj" /ProjectConfig "Release|Any CPU"
No matter what I have tried the installer project does not build and it gives an error (pop's up the Microsoft visual studio helper window)
If I run the code without the installer such as the follow that project will be built just fine.
devenv.exe <SolutionName>.sln /Build "Release|Any CPU" /Project "<ProjectName>.vbproj" /ProjectConfig "Release|Any CPU"
What I am missing to get the installer project to build?
clarity: - for devenv.exe I am pointing straight to the devenv.exe for VS 2015, I do have multiple versions of VS installed - I am using "" around the locations paths to deal with the spaces in the names - language is VB.Net
Suggestions that help to locate the cause of issue and then resolve it.
1.Try using devenv.com
instead of devenv.exe
, so that you can quickly get output info.
See this: Using devenv.exe directly prevents output from appearing on the console.
2.For installer project, it doesn't have platform like Any Cpu
. See this:
For Release|Any Cpu
solution configuration, the installer project(Setup1) doesn't have Any CPU
project platform by default. Which mean your /ProjectConfig "Release|Any CPU"
is not valid. I think it can build if you changes it to be /ProjectConfig Release
3.And make sure your path is all right. For me, I opened Developer Command Prompt for VS2015
and then navigate to solution folder by cd C:/solutionPath
. Then i use command like this to build the installer project:
Normally the project file is in SolutionPath/ProjectName(one folder)/projectName.vdproj
, so I use InstallerProjectName\InstallerProjectName.vdproj
instead of InstallerProjectName.vdproj
. (You may need to correct the InstallerProjectName.vbproj to InstallerProjectName.vdproj in your question...)
And now the devenv command will actually try to build the installer project. And if you meet HRESULT='8000000A'
, it's known issue about installer project. Check my another issue for more details to resolve that. (For VS2015, you should use corresponding way of VS2015)
Hope it helps:)