-
Notifications
You must be signed in to change notification settings - Fork 24
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
Setup using HeatDirectory task kills Visual Studio 2022 #6636
Comments
Yes. VS2022 is crashing with preview extension. |
You're calling the
|
Bob, I disagree that this should be closed. You are describing a workaround, which I had already provided. I don't think the workaround is/should be necessary. Please reference the following link: MSBuild and 64-bit Visual Studio 2022 I briefly took a look at the overall assembly used for this MsBuild task when I first discovered this issue and I can't understand why it cannot simply target AnyCpu. If I recall properly, Burn uses some native code that would limit this change, but I believe this is in a different assembly. I also believe that in Wix vNext this assembly is now AnyCpu. If changing the build task to AnyCpu is not possible, declaring (in wix.targets) Either of the above potential changes that can be made in Wix is an option that would not require a change to existing projects, as the workaround does. Leaving Wix as-is assumes that folks can figure out this change is necessary. It is disturbing that this causes Visual Studio to crash. This fact makes it rather difficult to determine the underlying cause, as I can attest. Certainly MsBuild and Visual Studio could do a better job at error handling - and perhaps that would be able to point the finger at that specific build task, which may lead people here for the workaround. |
The task is MSIL; Heat.exe is x86 to support registry harvesting. |
I don't know if this is a good idea, since I never harvested registry entries, but: |
If you want the tool to automatically run out of process, then you should probably be creating a HarvestDirectory item and just rely on the built-in targets to do the harvesting with the correct parameters |
Harvesting self-registration requires an architecture-specific process because it loads architecture-specific DLLs. |
This comment was marked as abuse.
This comment was marked as abuse.
Fixes: wixtoolset/issues#6636 MSBuild typically handles exceptions thrown directly by tasks and reports them as errors. WixToolTask.ExecuteTool, however, is forking its execution onto another thread and this thread is throwing when invoking Heat directly in-proc. This is crashing its host. This is wixtoolset#15 of all crashes in Visual Studio 17.3. Handle the error and give a helpful message instead of crashing.
I'm trying to build my installer using MSBUild 17.0.0.52104 (Visual Studio 2022) from the Visual Studio. My setup includes this extra build target:
This successfully runs with MSBuild from VS 2019 (x86), but crashes with MSBuild from VS2022 (x64) with this exception:
Now, I fixed this by adding the attribute
RunAsSeparateProcess="true"
to theHeatDirectory
task (as described in (#2570).I just wanted to bring this issue to attention, because it kills Visual Studio 2022 reliably every time I build the setup if the
RunAsSeparateProcess
is not set to true.The text was updated successfully, but these errors were encountered: