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

Custom platform not supported #17

Open
iskiselev opened this issue Jan 17, 2023 · 5 comments
Open

Custom platform not supported #17

iskiselev opened this issue Jan 17, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@iskiselev
Copy link

HeatWave Version

0.9.3

Visual Studio Version

17.4.4

Repro Steps

  1. Open a solution and add new project of type "MSI Package (WiX v4)"
  2. On file menu click on Build -> Configuration Manager
  3. Click on the Platform down next to the installer project

Alterantively:
Add <Platforms>Any;x64;x86;ARM64</Platforms> to PropertyGroup of installer project

Actual Result

No option "New" to add platform. List of platforms does not honor Platforms property of the project.

Expected Result

A way to add / edit list of used projects. At least honor list of platforms configured in project.

With WIX 3 I used custom platform "Any", that used to build for both x86/x64 platforms from one Build (similar to TargetFramewroks in .NET projects).
It is still perfectly supported with command line build with something like:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="Platform">
  <Target Name="_ComputeTargetPlatformItems">
    <ItemGroup>
      <_TargetPlatfrom Include="x86;x64" />
      <_InnerBuildProjects Include="$(MSBuildProjectFile)">
        <AdditionalProperties>Platform=%(_TargetPlatfrom.Identity)</AdditionalProperties>
      </_InnerBuildProjects>
    </ItemGroup>
  </Target>

  <Target Name="DispatchToInnerBuilds"
          DependsOnTargets="_ComputeTargetPlatformItems">
    <MSBuild Projects="@(_InnerBuildProjects)"
             Condition="'@(_InnerBuildProjects)' != '' "
             BuildInParallel="true" />
  </Target>
  
  <Target Name="Build" DependsOnTargets="DispatchToInnerBuilds" />
  <Target Name="Clean"
          DependsOnTargets="_ComputeTargetPlatformItems">
    <MSBuild Projects="@(_InnerBuildProjects)"
             Condition="'@(_InnerBuildProjects)' != '' "
             Targets="Clean"
             BuildInParallel="true" />
  </Target>
  <Target Name="Rebuild" DependsOnTargets="Clean;Build" />
</Project>

It is possible to use some other hacks to achieve the same (I could use something like <TargetPlatforms>x86;x64<TargetPlatforms> property to drive the same - but it will be less intuitive in VS, as platform for outer build will be selected to either x86/x64/arm64.

@iskiselev iskiselev added the triage To be reviewed by FireGiant label Jan 17, 2023
@iskiselev
Copy link
Author

It is a little bit similar to #12.

@iskiselev
Copy link
Author

For references: https://github.com/dotnet/project-system/blob/main/docs/configurations.md Platforms/Configurations properties used to define them in dotnet project-system.

@FireGiantHelp
Copy link
Collaborator

This issue does seem related to #12. We'll include this issue when addressing that backlog item.

@FireGiantHelp FireGiantHelp added bug Something isn't working and removed triage To be reviewed by FireGiant labels Jan 23, 2023
@PeterESoft
Copy link

I found a workaround for this issue by adapting the installation file "FireGiant.HeatWave.DesignTime.targets":
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\FireGiant\HeatWave\FireGiant.HeatWave.DesignTime.targets
Remove the lines:
<PropertyGroup> <Configurations>Debug;Release</Configurations> <Platforms>x86;x64;ARM64</Platforms> </PropertyGroup>

I think adding those properties only when no previous values are set might work then for everyone

@FireGiantHelp
Copy link
Collaborator

HeatWave v0.9.5 should now respect custom Configurations and Platforms properties defined in the .wixproj. Also, Configurations can be added and edited via HeatWave but Platforms only supports editing. We'll keep this issue open as we continue to investigate support for adding new Platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants