title: How to properly build MSI Setup Projects using Azure DevOps Pipelines?
body: <p>I have been pulling my hair for the past couple days trying to figure out how set up a CI/CD process just to build a simple WPF solution and create the MSI setup file ("artifact") using Azure DevOps Pipelines. I have tried using <a href="https://marketplace.visualstudio.com/items?itemName=dutchworkz.BuildInstaller" rel="noreferrer">Build VS Installer</a> to accomplish this. My main problem is that I don't know exactly what am I doing wrong or what steps I am missing and I can't find clear instructions on this anywhere.</p>
  
  <p>Here's what I've tried:</p>
  
  <ol>
  <li><p>Using the Hosted 2017 agent pool and the basic .NET Desktop Template. Problems:</p>
  
  <ul>
  <li>Create .msi file(s) from VS Installer project(s) as last task or before publishing artifact):</li>
  </ul></li>
  </ol>
  
  <p><code>2018-11-28T22:57:56.3186071Z DEBUG: Aggregated: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com
  2018-11-28T22:57:56.3211382Z Now running (C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com) with Arguments ("D:\a\1\s" /Build "release|any cpu" /Out "D:\a\1\b\BuildInstaller_Log_20181128225756.txt")
  2018-11-28T22:58:54.0015320Z Done running DevEnv process. Success = True.
  2018-11-28T22:58:54.1169279Z ##[warning]No .MSI files were found, please check your build-configuration. If this is expected, you might consider to use the default Visual Studio Build task instead of this custom Installer task.
  2018-11-28T22:58:54.1434410Z ##[section]Finishing: Create .msi file(s) from VS Installer project(s).</code></p>
  
  <p><a href="https://i.stack.imgur.com/NlhSv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NlhSv.png" alt="enter image description here"></a></p>
  
  <ol start="2">
  <li>Creating my own build agent as outlined <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=vsts" rel="noreferrer">in the documentation</a>. I have Visual Studio Community 2017 with the <a href="https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2017InstallerProjects" rel="noreferrer">VS Installer Projects extension</a> installed on that server. I followed the steps from <a href="https://stackoverflow.com/a/46761812/8050298">this</a> related answer. Results:</li>
  </ol>
  
  <p><code>2018-11-29T17:46:03.9813075Z DEBUG: Aggregated: System.Object[]\devenv.com
  2018-11-29T17:46:04.4346060Z ##[error]Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is not valid: System.Object[]
  2018-11-29T17:46:04.4716416Z ##[section]Finishing: Create .msi file(s) from VS Installer project(s).</code></p>
  
  <p><a href="https://i.stack.imgur.com/jmsPX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jmsPX.png" alt="enter image description here"></a></p>
  
  <p>I also tried DevEnv Build from the market place instead of the DutchWorkz one and still couldn't get an .msi file. Can someone please show me some clear steps on how to achieve this simple goal?</p>