0

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

user1255276
  • 541
  • 2
  • 5
  • 20
  • Hi friend, I'm a bit confused about whether this issue occurs only on tfsbuild or local build. Does it work well without any issue when you run the command locally? – LoLance Jan 10 '20 at 03:27
  • Sorry for the confusing. What I talk about here is all locally. Ultimately I want this to be a script on TFSBuild. This is because from what I have read MSBuild does not build Deployment projects, and i was getting errors says that MSBuild does not recognize the project. So, what I read is that you want to create a script on the build machine to force it to then build this deployment project. And this is what I am testing here, just the script locally to just force MSBuild to build the project via cmd / script. I may end up going a different route as this one is not working out so well. – user1255276 Jan 10 '20 at 15:23

1 Answers1

1

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:

enter image description here

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:

enter image description here

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:)

LoLance
  • 25,666
  • 1
  • 39
  • 73
  • Changing to Release worked. I tried devenv.com, but I think this takes the latest version of VS installed? I was getting errors on the projects because they are compiled for 2015 and the latest version I have is 2019. However, with pointing directly to the devenv.exe 2015 version and changing the release type to just release, worked. Thanks. – user1255276 Jan 14 '20 at 15:31