diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0427f67c..13d5215d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -16,7 +16,8 @@ on:
workflow_dispatch:
env:
- ENABLE_DIAGNOSTICS: false
+ ENABLE_DIAGNOSTICS: true
+ MSBUILD_VERBOSITY: diagnostic
#COREHOST_TRACE: 1
COREHOST_TRACEFILE: corehosttrace.log
@@ -209,11 +210,11 @@ jobs:
- name: Add project heads to ${{ env.TEST_PROJECT_NAME }}
working-directory: ./${{ env.TEST_PROJECT_DIRECTORY }}
- run: ${{ github.workspace }}/${{ env.HEADS_DIRECTORY }}/GenerateSingleSampleHeads.ps1 -MultiTargets ${{ matrix.multitarget }} -winui ${{ matrix.winui }} -componentPath "${{ github.workspace }}/${{ env.TEST_PROJECT_DIRECTORY }}${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }}"
+ run: ${{ github.workspace }}/${{ env.HEADS_DIRECTORY }}/GenerateSingleSampleHeads.ps1 -MultiTargets ${{ matrix.multitarget }} -winui ${{ matrix.winui }} -componentPath "${{ github.workspace }}/${{ env.TEST_PROJECT_DIRECTORY }}"${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }}
- name: MSBuild
working-directory: ./${{ env.TEST_PROJECT_DIRECTORY }}
- run: msbuild.exe ${{ env.TEST_PROJECT_NAME }}.sln /restore /nowarn:MSB4011 -p:Configuration=Release
+ run: msbuild.exe ${{ env.TEST_PROJECT_NAME }}.sln /restore /nowarn:MSB4011 -p:Configuration=Release /m ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }} /v:${{ env.MSBUILD_VERBOSITY }}
# Run tests
- name: Setup VSTest Path
@@ -238,7 +239,7 @@ jobs:
uses: actions/upload-artifact@v4
if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}
with:
- name: new-experiment-logs
+ name: new-experiment-logs-${{ matrix.multitarget }}-winui${{ matrix.winui }}
path: ./**/*.*log
wasm-linux:
diff --git a/GenerateSingleSolution.ps1 b/GenerateSingleSolution.ps1
index 9f6c5736..e0e73d7d 100644
--- a/GenerateSingleSolution.ps1
+++ b/GenerateSingleSolution.ps1
@@ -167,8 +167,14 @@ $projects = [System.Collections.ArrayList]::new()
dotnet tool restore
$generatedSolutionFilePath = "$componentPath\$componentName.sln"
-$platforms = '"Any CPU;x64;x86;ARM64"'
-$slngenConfig = "--folders true --collapsefolders true --ignoreMainProject"
+$platforms = 'Any CPU;x64;x86;ARM64'
+$slngenConfig = @(
+ '--folders'
+ 'true'
+ '--collapsefolders'
+ 'true'
+ '--ignoreMainProject'
+)
# Remove previous file if it exists
if (Test-Path -Path $generatedSolutionFilePath)
@@ -211,8 +217,13 @@ $projects = $projects + "$PSScriptRoot\CommunityToolkit.Tooling.XamlNamedPropert
if ($UseDiagnostics.IsPresent)
{
- $sdkoptions = " -d"
- $diagnostics = '-bl:slngen.binlog --consolelogger:"ShowEventId;Summary;Verbosity=Detailed" --filelogger:"LogFile=slngen.log;Append;Verbosity=Diagnostic;Encoding=UTF-8" '
+ $sdkoptions = "-d"
+ $diagnostics = @(
+ '-bl:slngen.binlog'
+ # Console logger + binlog causes exception and failure
+ # Track https://github.com/microsoft/slngen/issues/451
+ #'--consolelogger:ShowEventId;Summary;Verbosity=Detailed'
+ )
}
else
{
@@ -220,11 +231,29 @@ else
$diagnostics = ""
}
-$cmd = "dotnet$sdkoptions tool run slngen -o $generatedSolutionFilePath $slngenConfig $diagnostics--platform $platforms $($projects -Join ' ')"
+$cmd = 'dotnet'
+$arguments = @(
+ $sdkoptions
+ 'tool'
+ 'run'
+ 'slngen'
+ '-o'
+ $generatedSolutionFilePath
+ $slngenConfig
+ $diagnostics
+ '--platform'
+ $platforms
+ $projects
+ "--launch $launch"
+)
+
+# See https://learn.microsoft.com/en-us/powershell/scripting/learn/experimental-features?view=powershell-7.4#psnativecommandargumentpassing
+$PSNativeCommandArgumentPassing = 'Legacy'
+
-Write-Output "Running Command: $cmd"
+Write-Output "Running Command: $cmd $arguments"
-Invoke-Expression $cmd
+&$cmd @arguments
# go back to main working directory
Pop-Location
diff --git a/MultiTarget/PackageReferences/Uwp/Microsoft.Web.WebView2.props b/MultiTarget/PackageReferences/Uwp/Microsoft.Web.WebView2.props
index 1da0cfb4..dc608f6e 100644
--- a/MultiTarget/PackageReferences/Uwp/Microsoft.Web.WebView2.props
+++ b/MultiTarget/PackageReferences/Uwp/Microsoft.Web.WebView2.props
@@ -4,7 +4,7 @@
-
+
diff --git a/MultiTarget/PackageReferences/WinAppSdk.props b/MultiTarget/PackageReferences/WinAppSdk.props
index a20dc840..fdfe735a 100644
--- a/MultiTarget/PackageReferences/WinAppSdk.props
+++ b/MultiTarget/PackageReferences/WinAppSdk.props
@@ -1,7 +1,6 @@
-
-
-
+
+
diff --git a/ProjectHeads/App.Head.WinAppSdk.Dependencies.props b/ProjectHeads/App.Head.WinAppSdk.Dependencies.props
index 118db253..cdac0778 100644
--- a/ProjectHeads/App.Head.WinAppSdk.Dependencies.props
+++ b/ProjectHeads/App.Head.WinAppSdk.Dependencies.props
@@ -3,6 +3,6 @@
-
+