Skip to content

Tests fail in devbuild for 7.0.2 if Visual Studio 2022 is not installed #9261

@marcOcram

Description

@marcOcram

WiX Version

7.0.2

.NET or MSBuild or Visual Studio Version

.NET 10.0.201

HeatWave Version

No response

Repro Steps

  1. Only have Visual Studio 2026 installed
  2. run devbuild as per the README through Developer Command
  3. Get "Failed to find an installed MSBuild"

Repro Repo

No response

Actual Result

It cannot find MSBuild.

Maybe due to https://github.com/wixtoolset/wix/blob/main/src/internal/WixInternal.TestSupport/MsbuildRunner.cs#L11

  WixToolsetTest.Sdk Test net8.0 fehlerhaft mit 59 Fehler(n) (20,3s) → ..\..\build\wix\Release\test\WixToolsetTest.Sdk\net8.0\WixToolsetTest.Sdk.dll
    D:\wix\src\wix\test\WixToolsetTest.Sdk\MsbuildFixture.cs(24): error test failed:
      CanBuildSimpleBundle (MSBuild) (205ms): Die Testmethode „WixToolsetTest.Sdk.MsbuildFixture.CanBuildSimpleBundle“ hat eine Ausnahme ausgelöst:
      System.InvalidOperationException: Failed to find an installed MSBuild
      Stapelüberwachung:
         at WixInternal.MSTestSupport.MsbuildRunner.InitAndExecute(String msbuildVersion, String projectPath, String[] arguments, Boolean x64) in D:\wix\src\internal\WixInternal.MSTestSupport\MsbuildRunner.cs:line 80
         at WixInternal.MSTestSupport.MsbuildRunner.Execute(String projectPath, String[] arguments, Boolean x64) in D:\wix\src\internal\WixInternal.MSTestSupport\MsbuildRunner.cs:line 22
         at WixInternal.MSTestSupport.MsbuildUtilities.BuildProject(BuildSystem buildSystem, String projectPath, String[
      ] arguments, String configuration, String verbosityLevel, Boolean suppressValidation, Boolean binlog) in D:\wix\sr
      c\internal\WixInternal.MSTestSupport\MsbuildUtilities.cs:line 57
         at WixToolsetTest.Sdk.MsbuildFixture.CanBuildSimpleBundle(BuildSystem buildSystem) in D:\wix\src\wix\test\WixTo
      olsetTest.Sdk\MsbuildFixture.cs:line 39 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructo
      r) at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags
       invokeAttr)

Expected Result

A successful build without failing tests

Acknowledgements

Metadata

Metadata

Assignees

No one assigned

    Labels

    build processup for grabsNo one volunteered to fix the issue. If you are interested, comment with "I want to fix this issue"

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions