Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Microsoft Visual Studio Installer Projects" Extension #1382

Closed
1 of 6 tasks
softworkz opened this issue Aug 7, 2020 · 19 comments
Closed
1 of 6 tasks

Add "Microsoft Visual Studio Installer Projects" Extension #1382

softworkz opened this issue Aug 7, 2020 · 19 comments
Assignees
Labels
Area: C/C++ awaiting-deployment Code complete; awaiting deployment and/or deployment in progress enhancement New feature or request OS: Windows

Comments

@softworkz
Copy link

Tool information

Area for Triage: Visual Studio

Question, Bug, or Feature?: Tool Request

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Ubuntu 20.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Can this tool be installed during the build?
AFAIK, no. Otherwise it would still be convenient to have this by default.

Tool installation time in runtime
It's just 5 MB, so < 1min

Are you willing to submit a PR?
You'll know better how to install a VS extension inside your image generation ecosystem.

@andy-mishechkin
Copy link
Contributor

Hello, @softworkz
I've added MS Visual Studio Installer projects extension to Windows image deployment.
It will be there about on the next week.
If you'll not find it - feel free to ping me
Thank you

@softworkz
Copy link
Author

@miketimofeev
Copy link
Contributor

@softworkz I'm afraid the new image won't be in the next week, likely the week after.

@miketimofeev miketimofeev added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Sep 18, 2020
@softworkz
Copy link
Author

@softworkz I'm afraid the new image won't be in the next week, likely the week after.

After waiting years for this, those few days won't really matter 😆
Thanks for letting me know!

@miketimofeev
Copy link
Contributor

@softworkz good news! The image with MS Visual Studio Installer projects extension is already deployed! Could you check it, please?

@andy-mishechkin
Copy link
Contributor

I've checked the availability of this VSIX extension on the windows-latest runner - "Microsoft Visual Studio Installer Projects" extension is present

@softworkz
Copy link
Author

@andy-mishechkin @miketimofeev

Great job! Thanks a lot for making this possible.

I was able to successfully build a Visual Studio Solution including a Visual Studio Installer Project (vdproj) with an Azure Build Pipeline on an Azure hosted build agent.

Instructions

1. Don't use the "Visual Studio Build" task

The name of this task is lying. It doesn't build with Visual Studio but uses MSBuild instead.

Unfortunately none of the built-in Azure tasks is able to run a build via devenv.exe.

2. How to Build Instead

  • Command Line
    Of course you can always use a command line task and assemble the required parameters manually, and write some code to detect the installation path of VS (latest or specific version)
  • I tried the "DevEnv Build" extension from the marketplace and it worked right away
    https://marketplace.visualstudio.com/items?itemName=mmajcica.devenv-build
    • I entered the solution for Solution / Project
    • left Project empty
    • Configuration: Release
    • Platform: Any CPU
    • Deploy: Unchecked
    • Clean: Checked

3. Copy Files Task

Some of the templates include a copy files task with a Contents parameter similar to **\bin\$(BuildConfiguration)\**

Make sure to change this as it won't copy the generated MSI setup (because there is no 'bin' subfolder).

That's all. I'm sure this will make a lot of people very happy..

@AngellusMortis
Copy link

AngellusMortis commented Sep 27, 2020

I am still not able to get this working on my project. I am getting the error:

ERROR: An error occurred while validating.  HRESULT = '8000000A'

Which searching around lead me to this as the best explanation of why:

https://github.com/it3xl/MSBuild-DevEnv-Build-Server-Workarounds/blob/master/workaround/DevEnv-Vdproj-VS2017_Enterprise-HRESULT-8000000A-EnableOutOfProcBuild.bat

it3xl/MSBuild-DevEnv-Build-Server-Workarounds#1 (comment)

Is there any way we can get the DisableOutOfProcBuild command ran in the base image or the EnableOutOfProcBuild registry key added manually? I seems like I cannot cd out of the workspace folder to go run the command at build time.

@softworkz
Copy link
Author

Just add a "Command Line Script" task before the devenv task:

  • Script: DisableOutOfProcBuild.exe
  • Advanced > Working Directory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild

@AngellusMortis
Copy link

Oh thanks. It looks like the working-directory param was what I was missing. I was trying to cd out of the workspace and it would not let me. It seems you are jailed to the working directory. At least for Github actions.

@marichaux
Copy link

marichaux commented Nov 19, 2020

I am using a command line but getting this error for all .modelproj:
Diseño\AccesoDatos\AccesoDatos\AccesoDatos.modelproj: The application which this project type is based on was not found. Please try this link for further information: https://go.microsoft.com/fwlink/?LinkId=660952&projecttype=F088123C-0E9E-452A-89E6-6BA2F21D5CAC

@DavidStrickland0
Copy link

Would be nice if this was done on Windows-2022 as well

@miketimofeev
Copy link
Contributor

Hey @DavidStrickland0!
There is an issue for that already #4580
Please keep an eye on it as we are going to add the extension soon.

@czechdude
Copy link

Hi, great work, could you publish an example azure-pipelines.yml to use for building vdproj on azure pipelines? thanks!

@softworkz
Copy link
Author

.vdproj projects are not MSBuild projects, which means need to do an IDE build calling devenv.exe. There's an extension on the marketplace for this.

@czechdude
Copy link

i thought this issue is about adding such extension to windows-2019 image for MS hosted agents?

@softworkz
Copy link
Author

Correct. Sorry for the confusion.

What I meant above is an Azure DevOps extension on the Azure DevOps MarketPlace.
I looked it up now. This is the one I'm using: https://marketplace.visualstudio.com/items?itemName=mmajcica.devenv-build

@softworkz
Copy link
Author

You might also need to run this CMD script before:

steps:
- script: |
   echo Executing DisableOutOfProcBuild
   
   DisableOutOfProcBuild.exe
  workingDirectory: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild'
  displayName: 'Command Line Script'

Background: it3xl/MSBuild-DevEnv-Build-Server-Workarounds#1

@gbakeman
Copy link

Apologies if this is off topic, but I'm getting started with GitHub Actions/CI/Workflows and am confused about how Azure Pipelines translate over to the former, if at all. Can someone provide a short example of how one utilizes this .vdproj/devenv build feature from the perspective of a GitHub workflow .yaml?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C/C++ awaiting-deployment Code complete; awaiting deployment and/or deployment in progress enhancement New feature or request OS: Windows
Projects
None yet
Development

No branches or pull requests

10 participants