wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 36 forks source link

Visual Studio 2022 integration? #6493

Closed nbelyh closed 2 years ago

nbelyh commented 3 years ago

Visual Studio 2022 integration does not seem to be available (yet?) Would be nice to have it by the time 2022 is released.

Since it's x64, probably, there may be some issues.

Or maybe I am missing something?

BMurri commented 3 years ago

The WiX Toolset team has traditionally tried to time its releases to be near the public production release of the associated tool (so, usually not previews).

ChrisShawK2 commented 3 years ago

Understood. If a 'preview' version could be available earlier, though (even if only to let me load -- not run -- WiX projects), I'd install it right away, and then the real one when available...?

rkieslinger commented 3 years ago

Will Visual Studio 2022 integration support wix v3.xx?

igalfsg commented 2 years ago

is there a beta or something we can try for VS 2022 RC?

robmen commented 2 years ago

Not yet. It is not common for us to push to get Votive released ahead of VS RTM. But this PR is promising.

drolevar commented 2 years ago

@robmen Do you have an idea whether wix3 will be patched to support VS2022? If you can think of releasing an updated version of wix3, I can do this.

robmen commented 2 years ago

@drolevar here's how we are operating right now:

  1. wix4 - this gets the attention. Things that distract us from this are secondary because we need to get wix4 done and released.
  2. WiX v3.14 changes - if someone does the work to contribute a fix to wix4 and makes a very good case why the change should be in WiX v3.14 and asks really kindly to accept the change into WiX v3.14, then we've been taking changes. This is a softening of our original position of WiX v3.14 where we said "only security fixes because we need to focus on wix4". Unfortunately, reality is wix4 is taking longer than hoped. But again, distracting from wix4 slows wix4 and I want to get wix4 done (see the pattern 😝 ).
robmen commented 2 years ago

Blair's comment about us usually working to RTM not pre-releases is correct).

Bookkeeping: there are two PRs for me to reconcile and test against VS2022:

  1. https://github.com/wixtoolset/VisualStudioExtension/pull/19
  2. https://github.com/wixtoolset/VisualStudioExtension/pull/21
frozenprakash commented 2 years ago

Any news on when any version of Wix Toolkit gonna come out for VS2022 support? Wix Toolkit is the only thing stopping me from upgrading my solution from VS2019 to VS2022 😞

Also, VS2022 RC3 itself is there now and VS2022 full version will be out by 2021-11-08 globally, So will there be any version from Wix Toolkit which will be out for VS2022 support before 2021-11-08? ⌛

robmen commented 2 years ago

It is not common for us to push to get Votive released ahead of VS RTM.

drolevar commented 2 years ago

@frozenprakash If you are in real hurry (like me :) ) you can build it from the source as mentioned here wixtoolset/VisualStudioExtension#21.

Terricide commented 2 years ago

Anywhere to grab this without having to build source code myself?

robmen commented 2 years ago

Try https://bit.ly/2ZEW5Bt

sfullerbeckman commented 2 years ago

When is the Visual Studio 2022 Wix extension going to be released? Visual Studio 2022 was released today.

robmen commented 2 years ago

@sfullerbeckman Soon.

drolevar commented 2 years ago

@sfullerbeckman The Visual Studio SDK Nuget package is still in a preview state. So I'll wait until they issue a release version and then update this PR.

danlyons-home commented 2 years ago

@drolevar Amusingly, it looks like the Visual Studio SDK Nuget package added a release version not long after your comment.

FG-rgb commented 2 years ago

When does there will be a release for the VS2022 Wix extension?

robmen commented 2 years ago

Soon

frozenprakash commented 2 years ago

Started a branch to test with Visual studio installer.

Not to discredit the Wix team, but in future this will be holding back my projects for several months before every future Visual studio releases.

drolevar commented 2 years ago

@frozenprakash Not to discredit you, but to you really plan on moving from WiX to .vdproj-based Visual Studio Installer? Or did I misunderstand you?

mortenn commented 2 years ago

@frozenprakash, in my opinion, if being able to use preview releases of VS is so important to you, then you should definitely use visual studio installer rather than wix toolset anyway.

While I personally do wish wix toolset would have worked in the 2022 preview so I could have used it for all the solutions I work on, it doesn't seem that critical to me.

frozenprakash commented 2 years ago

@frozenprakash, in my opinion, if being able to use preview releases of VS is so important to you, then you should definitely use visual studio installer rather than wix toolset anyway.

True that. I should had had an alternative installer to use during these needed situations.

frozenprakash commented 2 years ago

@frozenprakash Not to discredit you, but to you really plan on moving from WiX to .vdproj-based Visual Studio Installer? Or did I misunderstand you?

Yes. As usually during VS upgrade, I start the migration process fixing things couple of months in preview itself, so that I keep my solution compatible with new version right off the bat once full version is released.

fforjan commented 2 years ago

Note that there is a difference in the editor and the toolset. In our case, we are usually trying to upgrade the editor first and keep our build machine with previous version. When everything seems good then we upgrade the build machine to the newer version. In our team, usually we also start the preview of the editor to see what would be any impact in our workflow, we have been creating .vsconfig install file for the developers since preview 1 and some developers have migrated fully on VS2022 with the preview one.

We are not blocked for us as the developer can still use VS2019 to do any installer work if required, same as our build machine. I do not think it would be a critical item as in our case no developer should ever generate an installer as it is only produced by our build machines.

sfullerbeckman commented 2 years ago

I am blocked as a developer from fully using VisualStudio 2022 until Wix is supported.

gmichaud commented 2 years ago

@sfullerbeckman you can build the integration yourself from the PR -- https://github.com/wixtoolset/VisualStudioExtension/pull/21

sfullerbeckman commented 2 years ago

@gmichaud , how would I do that? Are there any tutorials for how to? I don't see any

gmichaud commented 2 years ago

@sfullerbeckman instructions in the link above. Right here: https://github.com/wixtoolset/VisualStudioExtension/pull/21#issuecomment-941993603

FG-rgb commented 2 years ago

@sfullerbeckman instructions in the link above. Right here: wixtoolset/VisualStudioExtension#21 (comment)

I got it builded, after several steps. Important is to fix strong-name problems by using this article: https://wixtoolset.org/development/building-wix/

mortenn commented 2 years ago

I just tried doing that myself, but it can't find "\bin\sn.exe" and the building-wix documentation page does not mention this executable.

Build started 10/11/2021 15:42:28.
Project "C:\github\VisualStudioExtension\tools\OneTimeWixBuildInitialization.proj" on node 1 (default targets).
C:\github\VisualStudioExtension\tools\OneTimeWixBuildInitialization.proj(30,5): error : Could not find sn.exe. Expected to find it at: \bin\sn.exe
Done Building Project "C:\github\VisualStudioExtension\tools\OneTimeWixBuildInitialization.proj" (default targets) -- FAILED.
FG-rgb commented 2 years ago

I just tried doing that myself, but it can't find "\bin\sn.exe" and the building-wix documentation page does not mention this executable.

Build started 10/11/2021 15:42:28.
Project "C:\github\VisualStudioExtension\tools\OneTimeWixBuildInitialization.proj" on node 1 (default targets).
C:\github\VisualStudioExtension\tools\OneTimeWixBuildInitialization.proj(30,5): error : Could not find sn.exe. Expected to find it at: \bin\sn.exe
Done Building Project "C:\github\VisualStudioExtension\tools\OneTimeWixBuildInitialization.proj" (default targets) -- FAILED.

a) Dit you run it with Developer command prompt for visual studio... x86 and "elevated"? b) https://stackoverflow.com/questions/1535871/cannot-find-sn-exe-to-sign-assembly

robmen commented 2 years ago

To be clear, none of my customers have asked for Visual Studio 2022 support. If you are a customer, please do open a support ticket so we know to prioritize VS2022 work with the other things we are doing for all of our customers.

If you're not a customer then you are a user. From users, we very much appreciate solid bug reports. We also appreciate users voting (👍🏻 is a good option) on open bug reports to help us see what is most interesting for people to work on. Finally, we also appreciate users that want to work and become contributors to directly help us improve the WiX Toolset.

But if you are simply a user (not a customer nor a regular contributor) then please do not make demands or suggest that those of us that do contribute spend our free time working on something that you get for free simply because you depend on it.

If the WiX Toolset is so important to you then become a customer or a contributor. Otherwise, as a user, wait while the contributors and customers carry the weight for you.

Gakk commented 2 years ago

Am I missing something, is not this a free open source project that everyone can contribute to?

I have also upgraded to VS2022, and started to use that for our projects since first preview. Since different versions of VS installs side-by-side I have no trouble opening VS2019 whenever there are changes that involve installer.

Not even a big and expensive product like JetBrains ReSharper managed to be ready in time for VS2022 (even though that is more annoying since we are paying a license for their product).

I have no problem giving the maintainers a little more time. I have read through every two-week developer meeting note since first preview of VS2022 and know they are working hard towards the goal.

Keep up the great work! 😃👍

EDIT/NOTE: I wrote this without having seen and read the previous response from @robmen 😊

gmichaud commented 2 years ago

@Gakk amen! It's also very easy to build the add-in from the VS2022 dev branch (one needs to read the instructions in the PR here)

Keep up the great work Wix team!

mortenn commented 2 years ago

a) Dit you run it with Developer command prompt for visual studio... x86 and "elevated"? b) https://stackoverflow.com/questions/1535871/cannot-find-sn-exe-to-sign-assembly

I do not have the Windows SDK installed, so that should be the cause.

echalone commented 2 years ago

I have also upgraded to VS2022, and started to use that for our projects since first preview. Since different versions of VS installs side-by-side I have no trouble opening VS2019 whenever there are changes that involve installer.

We have problems with side by side installation of VS 2019 and VS 2022 because we need to tell nuget to use the VS 2019 MSBuild instead of the autodetected VS 2022 MSBuild. But when we provide the VS 2019 MSBuild.exe path to nuget via parameter -MSBuildPath this error gets thrown during restore of the Wix project:

<PathToWixProjFile>\Example.wixproj : error MSB4057: The target "_IsProjectRestoreSupported" does not exist in the project.

I have created a bug report for this issue here: https://github.com/wixtoolset/issues/issues/6628

Edit: I've found a solution, especially for Microsoft Azure DevOps Build Agents, on how to force nuget to auto-detect the VS 2019 MSBuild.exe by default or even only for a specific call, if VS 2022 was installed in parallel. See my comment in the issue created by me on how it works: https://github.com/wixtoolset/issues/issues/6628#issuecomment-966254084

CyberSinh commented 2 years ago

@barnson , do you know when the extension will be available to download? Thanks.

barnson commented 2 years ago

@CyberSinh : Please see the many, many, many comments above that address your question.

CyberSinh commented 2 years ago

So there's no more specific date than "soon" to look forward to?

StevenRasmussen commented 2 years ago

It's closer now than the last time they last said it 😉. Please everyone stop asking the same question and spamming everyone. Everyone here wants it, and they know that everyone here wants it, and asking them "when" will not speed things up. If they want to give a date then I'm sure they'll post it here... but in the mean time be patient and I'm sure that they will deliver it as soon as they can. Thanks WIX team for your efforts!

frozenprakash commented 2 years ago

@CyberSinh As explained earlier, this is not a paid product and we can't ask anyone to finish the work quickly as everyone is contributing as much as they can in their leisure time.

I hope we respect them for the amount of work they did until now as open source developers and just wait it out.

Probably end of this year, I hope we will be getting the new version with support for VS2022.

Also as alternative as someone highlighted above, I am now Opening the same solution in VS2019 & VS2022 side by side, And use VS2022 to do all coding work, and use VS2019 for building with old wix which works flawlessly.

image

barnson commented 2 years ago

@StevenRasmussen, actually I wanted to delay the release for at least 24 hours for every time someone asks, but Rob said that was mean.

robmen commented 2 years ago

Let me reiterate:

none of my customers have asked for Visual Studio 2022 support. If you are a customer, please do open a support ticket so we know to prioritize VS2022 work with the other things we are doing for all of our customers. ... If the WiX Toolset is so important to you then become a customer or a contributor. Otherwise, as a user, wait while the contributors and customers carry the weight for you.

And:

Soon

robmen commented 2 years ago

WiX Toolset Visual Studio Extensions v1.0.0.12 now includes support for Visual Studio 2022. Huge thanks to @drolevar for implementing the fix.

After we get validation from the community that v1.0.0.12 works in all versions of Visual Studio (2010-2022), we'll start the process to publish to Visual Studio Marketplace.

davidnmbond commented 2 years ago

Visual Studio 2022 Community (Current) crashes and reloads for me when when building a simple wixproj on Windows 11 insider (latest).

I'm getting "Could not load file or assembly 'file:///C:\Program Files (x86)\WiX Toolset v3.11\bin\Heat.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format."

The heat.exe file IS present at the location. A "repair" of the .exe installer v3.11.2 makes no difference.

Additional 1: installing v.3.14.0.5722 makes no difference - the message changes as expected to "Could not load file or assembly 'file:///C:\Program Files (x86)\WiX Toolset v3.14\bin\Heat.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format." Again, the file is present. I'm trying to find some kind of log that tells me exactly what heat command was executed, so I can run it from the command line.

Additional 2: The command line is: 'C:\Program Files (x86)\WiX Toolset v3.14\bin\heat.exe' dir ..\My Project\bin\publish\ -cg WixInstallerAgent_Project -dr INSTALLFOLDER -scom -sreg -srd -var var.AgentHarvestPath -ag -sfrag -t HeatFilter.xsl -out WixInstallerAgent.wxs This works fine at the command line. Bitness issue?

Additional 3: See @StevenBonePgh 's workaround, below.

StevenBonePgh commented 2 years ago

@davidnmbond Please see my comment at https://github.com/wixtoolset/VisualStudioExtension/pull/21#issuecomment-954301018 I have proposed some changes and give a workaround, and have not heard from any of the maintainers regarding the approach they would accept a PR for. Since writing the above, I saw some additional guidance in the .NET Blog MSBuild and 64-bit Visual Studio 2022 , where the wix.targets could be altered to specify Architecture="x86" for any MSBuild tasks that absolutely must be implemented as x86 only.

davidnmbond commented 2 years ago

@StevenBonePgh THANK YOU! A workaround, not a fix, but it did work.

For others suffering the same issue, here is what you should do until there is a fix:

  1. Right click on your Setup Project
  2. Unload Project
  3. Ctrl+F HeatDirectory
  4. Add an attribute: RunAsSeparateProcess="true"
  5. Ensure that any other HeatDirectory nodes are similarly updated
  6. Right click on your Setup Project
  7. Reload Project
robmen commented 2 years ago

A new issue is tracking that heat.exe problem here: https://github.com/wixtoolset/issues/issues/6636

echalone commented 2 years ago

WiX Toolset Visual Studio Extensions v1.0.0.12 now includes support for Visual Studio 2022. Huge thanks to @drolevar for implementing the fix.

After we get validation from the community that v1.0.0.12 works in all versions of Visual Studio (2010-2022), we'll start the process to publish to Visual Studio Marketplace.

It works for us, we're not using the HeatDirectory feature though. Thanks for the swift response and support of VS 2022! And sorry for any impatience on our "user" side ;)