Skip to content

Commit

Permalink
Build with dotnet sdk 6.0.x, VS 2019
Browse files Browse the repository at this point in the history
Set SelfContained=true for .net projects
  • Loading branch information
nirbar committed Nov 22, 2023
1 parent 0610efe commit ca3f1ee
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
jobs:
build:
name: Build
runs-on: windows-2022
runs-on: windows-2019
permissions:
packages: write
id-token: write
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
path: build/logs/

- name: Publish nuget packages to github
if: ${{ github.event.inputs.publish_nuget == 'true' }}
if: ${{ github.event.inputs.publish_nuget == 'true' }} && ${{ github.ref == 'refs/heads/develop-psw-wix' }}
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_PAT }}
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<IsWixTestProject>true</IsWixTestProject>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<AssemblyName>Example.FullFramework2MBA</AssemblyName>
<RootNamespace>Example.FullFramework2MBA</RootNamespace>
<DebugType>embedded</DebugType>
<SelfContained>false</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>

Expand Down
2 changes: 2 additions & 0 deletions src/internal/SetBuildNumber/global.json.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"PanelSwWix4.Sdk": "{packageversion}"
},
"sdk": {
"version": "6.0.0",
"rollForward": "latestMinor",
"allowPrerelease": false
}
}
1 change: 1 addition & 0 deletions src/test/burn/TestBA/TestBA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<AssemblyName>TestBA</AssemblyName>
<RootNamespace>WixToolset.Test.BA</RootNamespace>
<DebugType>embedded</DebugType>
<SelfContained Condition=" '$(TargetFrameworkIdentifier)'!='.NETFramework' ">true</SelfContained>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<EnableDynamicLoading>true</EnableDynamicLoading>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
1 change: 1 addition & 0 deletions src/test/burn/TestBA/TestBA_x64.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<AssemblyName>TestBA</AssemblyName>
<RootNamespace>WixToolset.Test.BA</RootNamespace>
<DebugType>embedded</DebugType>
<SelfContained Condition=" '$(TargetFrameworkIdentifier)'!='.NETFramework' ">true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<EnableDynamicLoading>true</EnableDynamicLoading>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
1 change: 1 addition & 0 deletions src/test/burn/WixToolset.WixBA/WixToolset.WixBA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<AssemblyName>WixToolset.WixBA</AssemblyName>
<RootNamespace>WixToolset.WixBA</RootNamespace>
<DebugType>embedded</DebugType>
<SelfContained Condition=" '$(TargetFrameworkIdentifier)'!='.NETFramework' ">true</SelfContained>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<AssemblyTitle>WixToolset.WixBA</AssemblyTitle>
<Description>WiX Bootstrapper Application</Description>
Expand Down
1 change: 1 addition & 0 deletions src/test/burn/WixToolset.WixBA/WixToolset.WixBA_x64.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<AssemblyName>WixToolset.WixBA</AssemblyName>
<RootNamespace>WixToolset.WixBA</RootNamespace>
<DebugType>embedded</DebugType>
<SelfContained Condition=" '$(TargetFrameworkIdentifier)'!='.NETFramework' ">true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<AssemblyTitle>WixToolset.WixBA</AssemblyTitle>
<Description>WiX Bootstrapper Application</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<RequiresNativeWixAssets>true</RequiresNativeWixAssets>
<IsWixTestProject>true</IsWixTestProject>
</PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ public void CanBuildMultiTargetingWixlibUsingRids(BuildSystem buildSystem)

var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
"-Restore",
"-p:SelfContained=true",
MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath)
});
result.AssertSuccess();
Expand Down Expand Up @@ -726,6 +727,7 @@ public void CanBuildMultiTargetingWixlibUsingRidsWithReleaseAndDebug(BuildSystem

var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
"-Restore",
"-p:SelfContained=true",
MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath)
});
result.AssertSuccess();
Expand Down

0 comments on commit ca3f1ee

Please sign in to comment.