diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2e7cc2173..4b55b2ae3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,9 +6,8 @@ Below is our guidance for how to build the repo, report issues, propose new feat
C#/WinRT currently requires the following packages, or newer, to build:
-- [Visual Studio 17.0](https://visualstudio.microsoft.com/downloads/)
-- [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0)
-- [.NET Core 3.1 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.1)
+- [Visual Studio 17.0](https://visualstudio.microsoft.com/downloads/)
+- [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
- [nuget.exe 5.8.0-preview.3](https://www.nuget.org/downloads)
- Microsoft.WinUI 3.0.0-preview4.210210.4
- Microsoft.WindowsAppSDK 1.1.5
diff --git a/build/AzurePipelineTemplates/CsWinRT-Benchmarks-Steps.yml b/build/AzurePipelineTemplates/CsWinRT-Benchmarks-Steps.yml
index 8a22088a7..f9f763810 100644
--- a/build/AzurePipelineTemplates/CsWinRT-Benchmarks-Steps.yml
+++ b/build/AzurePipelineTemplates/CsWinRT-Benchmarks-Steps.yml
@@ -29,19 +29,6 @@ steps:
env:
PROCESSOR_ARCHITECTURE: x86
-# Install .NET 6 SDK
-- task: PowerShell@2
- displayName: Install .NET 6 SDK
- inputs:
- targetType: inline
- failOnStderr: true
- script: |
- Write-Host ##vso[task.setvariable variable=PATH;]${env:LocalAppData}\Microsoft\dotnet;${env:PATH};
-
- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
-
- &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version "$($env:NET6_SDK_VERSION)" -Architecture "x64" -AzureFeed "$($env:NET5_SDK_FEED)"
-
# Install .NET 8 SDK
- task: PowerShell@2
displayName: Install .NET 8 SDK
diff --git a/build/AzurePipelineTemplates/CsWinRT-Build-Steps.yml b/build/AzurePipelineTemplates/CsWinRT-Build-Steps.yml
index db5d0c9ec..9ff4a279f 100644
--- a/build/AzurePipelineTemplates/CsWinRT-Build-Steps.yml
+++ b/build/AzurePipelineTemplates/CsWinRT-Build-Steps.yml
@@ -51,19 +51,6 @@ steps:
env:
PROCESSOR_ARCHITECTURE: x86
-# Install .NET 6 SDK
-- task: PowerShell@2
- displayName: Install .NET 6 SDK
- inputs:
- targetType: inline
- failOnStderr: true
- script: |
- Write-Host ##vso[task.setvariable variable=PATH;]${env:LocalAppData}\Microsoft\dotnet;${env:PATH};
-
- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
-
- &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version "$($env:NET6_SDK_VERSION)" -Architecture "x64" -AzureFeed "$($env:NET5_SDK_FEED)"
-
# Install .NET 8 SDK
- task: PowerShell@2
displayName: Install .NET 8 SDK
@@ -261,7 +248,7 @@ steps:
displayName: Stage Unit Test
condition: and(succeeded(), or(eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildPlatform'], 'x64')))
inputs:
- SourceFolder: $(Build.SourcesDirectory)\src\Tests\UnitTest\bin\$(BuildPlatform)\$(BuildConfiguration)\net6.0
+ SourceFolder: $(Build.SourcesDirectory)\src\Tests\UnitTest\bin\$(BuildPlatform)\$(BuildConfiguration)\net8.0
Contents: |
unittest.dll
unittest.pdb
@@ -289,17 +276,6 @@ steps:
WinRT.SourceGenerator.pdb
TargetFolder: $(Build.ArtifactStagingDirectory)\release_netstandard2.0\
-# Stage Net6.0
-- task: CopyFiles@2
- displayName: Stage Net6.0
- condition: and(succeeded(), eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildConfiguration'], 'release'))
- inputs:
- SourceFolder: $(Build.SourcesDirectory)\src\WinRT.Runtime\bin\$(BuildConfiguration)\net6.0
- Contents: |
- WinRT.Runtime.dll
- WinRT.Runtime.pdb
- TargetFolder: $(Build.ArtifactStagingDirectory)\release_net6.0
-
# Stage Net8.0
- task: CopyFiles@2
displayName: Stage Net8.0
@@ -317,11 +293,11 @@ steps:
condition: and(succeeded(), eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildConfiguration'], 'release'))
continueOnError: True
inputs:
- SourceFolder: $(Build.SourcesDirectory)\src\Authoring\WinRT.Host.Shim\bin\$(BuildConfiguration)\net6.0
+ SourceFolder: $(Build.SourcesDirectory)\src\Authoring\WinRT.Host.Shim\bin\$(BuildConfiguration)\net8.0
Contents: |
WinRT.Host.Shim.dll
WinRT.Host.Shim.pdb
- TargetFolder: $(Build.ArtifactStagingDirectory)\release_net6.0
+ TargetFolder: $(Build.ArtifactStagingDirectory)\release_net8.0
# Stage IID Optimizer
- task: CopyFiles@2
@@ -329,7 +305,7 @@ steps:
condition: and(succeeded(), eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildConfiguration'], 'release'))
continueOnError: True
inputs:
- SourceFolder: $(Build.SourcesDirectory)\src\Perf\IIDOptimizer\bin\$(BuildConfiguration)\net6.0
+ SourceFolder: $(Build.SourcesDirectory)\src\Perf\IIDOptimizer\bin\$(BuildConfiguration)\net8.0
Contents: |
IIDOptimizer.exe
IIDOptimizer.dll
@@ -353,7 +329,7 @@ steps:
tr/System.CommandLine.resources.dll
zh-Hans/System.CommandLine.resources.dll
zh-Hant/System.CommandLine.resources.dll
- TargetFolder: $(Build.ArtifactStagingDirectory)\release_net6.0\IIDOptimizer
+ TargetFolder: $(Build.ArtifactStagingDirectory)\release_net8.0\IIDOptimizer
# Stage WinRT.Runtime ResX
- task: CopyFiles@2
@@ -380,7 +356,7 @@ steps:
displayName: Stage CsWinMD
condition: and(succeeded(), eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildConfiguration'], 'release'))
inputs:
- SourceFolder: $(Build.SourcesDirectory)\src\Authoring\cswinmd\bin\$(BuildConfiguration)\net6.0
+ SourceFolder: $(Build.SourcesDirectory)\src\Authoring\cswinmd\bin\$(BuildConfiguration)\net8.0
Contents: |
CsWinMD.dll
CsWinMD.exe
@@ -389,4 +365,4 @@ steps:
CsWinMD.runtimeconfig.json
Microsoft.CodeAnalysis.CSharp.dll
Microsoft.CodeAnalysis.dll
- TargetFolder: $(Build.ArtifactStagingDirectory)\release_net6.0\CsWinMD
+ TargetFolder: $(Build.ArtifactStagingDirectory)\release_net8.0\CsWinMD
diff --git a/build/AzurePipelineTemplates/CsWinRT-BuildAndTest-Stage.yml b/build/AzurePipelineTemplates/CsWinRT-BuildAndTest-Stage.yml
index 3b7e4edff..244bcd3dd 100644
--- a/build/AzurePipelineTemplates/CsWinRT-BuildAndTest-Stage.yml
+++ b/build/AzurePipelineTemplates/CsWinRT-BuildAndTest-Stage.yml
@@ -77,7 +77,7 @@ stages:
displayName: Run Object Lifetime Tests
condition: and(succeeded(), or(eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildPlatform'], 'x64')))
inputs:
- testAssemblyVer2: Tests\ObjectLifetimeTests\bin\$(BuildPlatform)\$(BuildConfiguration)\net6.0-windows10.0.19041.0\win10-$(BuildPlatform)\ObjectLifetimeTests.Lifted.build.appxrecipe
+ testAssemblyVer2: Tests\ObjectLifetimeTests\bin\$(BuildPlatform)\$(BuildConfiguration)\net8.0-windows10.0.19041.0\win-$(BuildPlatform)\ObjectLifetimeTests.Lifted.build.appxrecipe
searchFolder: $(Build.SourcesDirectory)\src
# Run Host Tests
@@ -173,11 +173,6 @@ stages:
condition: and(succeeded(), eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildConfiguration'], 'release'))
targetPath: $(Build.ArtifactStagingDirectory)\resx
artifactName: ResX
- - output: pipelineArtifact
- displayName: 'Publish Net6.0'
- condition: and(succeeded(), eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildConfiguration'], 'release'))
- targetPath: $(Build.ArtifactStagingDirectory)\release_net6.0
- artifactName: net6.0
- output: pipelineArtifact
displayName: 'Publish Net8.0'
condition: and(succeeded(), eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildConfiguration'], 'release'))
diff --git a/build/AzurePipelineTemplates/CsWinRT-PublishToMaestro-Stage.yml b/build/AzurePipelineTemplates/CsWinRT-PublishToMaestro-Stage.yml
index 22fe47926..61b4bb52d 100644
--- a/build/AzurePipelineTemplates/CsWinRT-PublishToMaestro-Stage.yml
+++ b/build/AzurePipelineTemplates/CsWinRT-PublishToMaestro-Stage.yml
@@ -42,4 +42,4 @@ stages:
- template: ..\..\eng\common\AzurePipelineTemplates\Maestro-PublishBuildToMaestro-Steps.yml@self
parameters:
AssetNames: Microsoft.Windows.CsWinRT;CsWinRT.Dependency.DotNetCoreSdk;CsWinRT.Dependency.DotNetCoreRuntime;CsWinRT.Dependency.WindowsSdkVersionSuffix
- AssetVersions: $(NugetVersion);$(Net6.Sdk.Version);$(_DotNetRuntimeVersion);$(_WindowsSdkVersionSuffix)
\ No newline at end of file
+ AssetVersions: $(NugetVersion);$(Net8.Sdk.Version);$(_DotNetRuntimeVersion);$(_WindowsSdkVersionSuffix)
\ No newline at end of file
diff --git a/build/AzurePipelineTemplates/CsWinRT-PublishToNuget-Stage.yml b/build/AzurePipelineTemplates/CsWinRT-PublishToNuget-Stage.yml
index 6d22b2d48..fb692d7c5 100644
--- a/build/AzurePipelineTemplates/CsWinRT-PublishToNuget-Stage.yml
+++ b/build/AzurePipelineTemplates/CsWinRT-PublishToNuget-Stage.yml
@@ -57,14 +57,6 @@ stages:
itemPattern: ''
targetPath: $(Build.SourcesDirectory)\netstandard2.0
-# Download Net6.0
- - task: DownloadPipelineArtifact@2
- displayName: 'Download Net6.0'
- inputs:
- artifactName: net6.0
- itemPattern: ''
- targetPath: $(Build.SourcesDirectory)\net6.0
-
# Download Net8.0
- task: DownloadPipelineArtifact@2
displayName: 'Download Net8.0'
@@ -99,8 +91,7 @@ stages:
netstandard2.0\WinRT.Runtime.dll
netstandard2.0\WinRT.Host.Shim.dll
netstandard2.0\WinRT.SourceGenerator.dll
- net6.0\WinRT.Host.Shim.dll
- net6.0\WinRT.Runtime.dll
+ net8.0\WinRT.Host.Shim.dll
net8.0\WinRT.Runtime.dll
release_x64\WinRT.Host.dll
release_x64\WinRT.Host.dll.mui
@@ -108,10 +99,10 @@ stages:
release_x86\WinRT.Host.dll.mui
release_arm64\WinRT.Host.dll
release_arm64\WinRT.Host.dll.mui
- net6.0\IIDOptimizer\IIDOptimizer.exe
- net6.0\IIDOptimizer\IIDOptimizer.dll
- net6.0\CsWinMD\CsWinMD.exe
- net6.0\CsWinMD\CsWinMD.dll
+ net8.0\IIDOptimizer\IIDOptimizer.exe
+ net8.0\IIDOptimizer\IIDOptimizer.dll
+ net8.0\CsWinMD\CsWinMD.exe
+ net8.0\CsWinMD\CsWinMD.dll
UseMinimatch: true
signConfigType: inlineSignParams
inlineOperation: |
@@ -159,10 +150,10 @@ stages:
AuthSignCertName: $(SigningSignCertName)
FolderPath: $(Build.SourcesDirectory)
Pattern: |
- net6.0\IIDOptimizer\Mono.Cecil.dll
- net6.0\IIDOptimizer\Mono.Cecil.Mdb.dll
- net6.0\IIDOptimizer\Mono.Cecil.Pdb.dll
- net6.0\IIDOptimizer\Mono.Cecil.Rocks.dll
+ net8.0\IIDOptimizer\Mono.Cecil.dll
+ net8.0\IIDOptimizer\Mono.Cecil.Mdb.dll
+ net8.0\IIDOptimizer\Mono.Cecil.Pdb.dll
+ net8.0\IIDOptimizer\Mono.Cecil.Rocks.dll
UseMinimatch: true
signConfigType: inlineSignParams
inlineOperation: |
@@ -230,7 +221,7 @@ stages:
command: pack
searchPatternPack: nuget/Microsoft.Windows.CsWinRT.nuspec
configurationToPack: Release
- buildProperties: cswinrt_nuget_version=$(NugetVersion);cswinrt_exe=$(Build.SourcesDirectory)\cswinrt.exe;interop_winmd=$(Build.SourcesDirectory)\WinRT.Interop.winmd;netstandard2_runtime=$(Build.SourcesDirectory)\netstandard2.0\WinRT.Runtime.dll;net6_runtime=$(Build.SourcesDirectory)\net6.0\WinRT.Runtime.dll;net8_runtime=$(Build.SourcesDirectory)\net8.0\WinRT.Runtime.dll;source_generator=$(Build.SourcesDirectory)\netstandard2.0\WinRT.SourceGenerator.dll;winrt_shim=$(Build.SourcesDirectory)\net6.0\WinRT.Host.Shim.dll;winrt_host_x86=$(Build.SourcesDirectory)\release_x86\WinRT.Host.dll;winrt_host_x64=$(Build.SourcesDirectory)\release_x64\WinRT.Host.dll;winrt_host_arm64=$(Build.SourcesDirectory)\release_arm64\WinRT.Host.dll;winrt_host_resource_x86=$(Build.SourcesDirectory)\release_x86\WinRT.Host.dll.mui;winrt_host_resource_x64=$(Build.SourcesDirectory)\release_x64\WinRT.Host.dll.mui;winrt_host_resource_arm64=$(Build.SourcesDirectory)\release_arm64\WinRT.Host.dll.mui;guid_patch=$(Build.SourcesDirectory)\net6.0\IIDOptimizer\*.*
+ buildProperties: cswinrt_nuget_version=$(NugetVersion);cswinrt_exe=$(Build.SourcesDirectory)\cswinrt.exe;interop_winmd=$(Build.SourcesDirectory)\WinRT.Interop.winmd;netstandard2_runtime=$(Build.SourcesDirectory)\netstandard2.0\WinRT.Runtime.dll;net8_runtime=$(Build.SourcesDirectory)\net8.0\WinRT.Runtime.dll;source_generator=$(Build.SourcesDirectory)\netstandard2.0\WinRT.SourceGenerator.dll;winrt_shim=$(Build.SourcesDirectory)\net8.0\WinRT.Host.Shim.dll;winrt_host_x86=$(Build.SourcesDirectory)\release_x86\WinRT.Host.dll;winrt_host_x64=$(Build.SourcesDirectory)\release_x64\WinRT.Host.dll;winrt_host_arm64=$(Build.SourcesDirectory)\release_arm64\WinRT.Host.dll;winrt_host_resource_x86=$(Build.SourcesDirectory)\release_x86\WinRT.Host.dll.mui;winrt_host_resource_x64=$(Build.SourcesDirectory)\release_x64\WinRT.Host.dll.mui;winrt_host_resource_arm64=$(Build.SourcesDirectory)\release_arm64\WinRT.Host.dll.mui;guid_patch=$(Build.SourcesDirectory)\net8.0\IIDOptimizer\*.*
- task: NuGetCommand@2
displayName: NuGet pack
@@ -239,7 +230,7 @@ stages:
command: pack
searchPatternPack: nuget/Microsoft.Windows.CsWinMD.nuspec
configurationToPack: Release
- buildProperties: cswinmd_nuget_version=$(NugetVersion);cswinmd_outpath=$(Build.SourcesDirectory)\net6.0\CsWinMD;source_generator=$(Build.SourcesDirectory)\netstandard2.0\WinRT.SourceGenerator.dll
+ buildProperties: cswinmd_nuget_version=$(NugetVersion);cswinmd_outpath=$(Build.SourcesDirectory)\net8.0\CsWinMD;source_generator=$(Build.SourcesDirectory)\netstandard2.0\WinRT.SourceGenerator.dll
# ESRP CodeSigning
- task: EsrpCodeSigning@5
diff --git a/build/AzurePipelineTemplates/CsWinRT-Variables.yml b/build/AzurePipelineTemplates/CsWinRT-Variables.yml
index 4d0ae9e39..a660d2e07 100644
--- a/build/AzurePipelineTemplates/CsWinRT-Variables.yml
+++ b/build/AzurePipelineTemplates/CsWinRT-Variables.yml
@@ -10,8 +10,6 @@ variables:
value: '2.2.0.0'
- name: Net5.SDK.Feed
value: 'https://dotnetcli.blob.core.windows.net/dotnet'
-- name: Net6.SDK.Version
- value: '6.0.424'
- name: Net8.SDK.Version
value: '8.0.303'
- name: NoSamples
@@ -27,7 +25,7 @@ variables:
- name: _RunGCStress
value: $[coalesce(variables.RunGCStress, 'false')]
- name: _DotNetRuntimeVersion
- value: $[coalesce(variables.DotNetRuntimeVersion, '6.0.32')]
+ value: $[coalesce(variables.DotNetRuntimeVersion, '8.0.303')]
- name: _WindowsSdkVersionSuffix
value: $[coalesce(variables.WindowsSdkPackageVersionSuffix, '25')]
- name: _PublishCsWinMD
diff --git a/docs/authoring.md b/docs/authoring.md
index 7888b16df..5509a3864 100644
--- a/docs/authoring.md
+++ b/docs/authoring.md
@@ -15,7 +15,7 @@ It is recommended to use .NET 6 and Visual Studio 2022 for C#/WinRT authoring sc
```xml
- net6.0-windows10.0.19041.0
+ net8.0-windows10.0.19041.0
```
@@ -66,9 +66,9 @@ To make your component available as a NuGet package, it is important to include
target="build\MyAuthoredComponent.targets" />
-
-
diff --git a/docs/embedded.md b/docs/embedded.md
index b0c4f5409..0e72c6578 100644
--- a/docs/embedded.md
+++ b/docs/embedded.md
@@ -47,7 +47,7 @@ Here is an example project file for a library cross-targeting and embedding a C#
- net6.0-windows;net5.0-windows;netstandard2.0
+ net8.0-windows;net5.0-windows;netstandard2.0
x64;x86
diff --git a/nuget/Microsoft.Windows.CsWinRT.Authoring.targets b/nuget/Microsoft.Windows.CsWinRT.Authoring.targets
index 7d4ad4bd1..571db1482 100644
--- a/nuget/Microsoft.Windows.CsWinRT.Authoring.targets
+++ b/nuget/Microsoft.Windows.CsWinRT.Authoring.targets
@@ -62,7 +62,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
-->
-
+
WinRT.Host.Shim.dll
PreserveNewest
@@ -284,7 +284,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
-->
-
+
true
lib\$(TargetFramework)
diff --git a/nuget/Microsoft.Windows.CsWinRT.Embedded.targets b/nuget/Microsoft.Windows.CsWinRT.Embedded.targets
index 5fdac7141..dc61b1898 100644
--- a/nuget/Microsoft.Windows.CsWinRT.Embedded.targets
+++ b/nuget/Microsoft.Windows.CsWinRT.Embedded.targets
@@ -16,7 +16,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
-
+
@@ -68,7 +68,6 @@ Copyright (C) Microsoft Corporation. All rights reserved.
-
diff --git a/nuget/Microsoft.Windows.CsWinRT.nuspec b/nuget/Microsoft.Windows.CsWinRT.nuspec
index 32e0dfcff..d4c2c67ea 100644
--- a/nuget/Microsoft.Windows.CsWinRT.nuspec
+++ b/nuget/Microsoft.Windows.CsWinRT.nuspec
@@ -14,7 +14,7 @@
LICENSE
https://github.com/microsoft/cswinrt
-
+
@@ -30,13 +30,12 @@
-
-
+
-
+
-
+
-
+
diff --git a/nuget/Microsoft.Windows.CsWinRT.targets b/nuget/Microsoft.Windows.CsWinRT.targets
index 876338f3c..41bb4594c 100644
--- a/nuget/Microsoft.Windows.CsWinRT.targets
+++ b/nuget/Microsoft.Windows.CsWinRT.targets
@@ -60,6 +60,10 @@ Copyright (C) Microsoft Corporation. All rights reserved.
+
+
+
+
@@ -124,16 +128,16 @@ Copyright (C) Microsoft Corporation. All rights reserved.
- $(CsWinRTPath)lib\net6.0
+ $(CsWinRTPath)lib\net8.0
$(CsWinRTPath)runtimes\**\native
-
-
-
+
+
+
diff --git a/src/Authoring/WinRT.Host.Shim/WinRT.Host.Shim.csproj b/src/Authoring/WinRT.Host.Shim/WinRT.Host.Shim.csproj
index fb24df655..25fb7c1c1 100644
--- a/src/Authoring/WinRT.Host.Shim/WinRT.Host.Shim.csproj
+++ b/src/Authoring/WinRT.Host.Shim/WinRT.Host.Shim.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;net6.0
+ netstandard2.0;net8.0
diff --git a/src/Authoring/WinRT.Host/NetHostDir.csproj b/src/Authoring/WinRT.Host/NetHostDir.csproj
index 341d68e52..9b566979e 100644
--- a/src/Authoring/WinRT.Host/NetHostDir.csproj
+++ b/src/Authoring/WinRT.Host/NetHostDir.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
diff --git a/src/Authoring/cswinmd/CsWinMD.csproj b/src/Authoring/cswinmd/CsWinMD.csproj
index 3f0a027ad..32521a5cb 100644
--- a/src/Authoring/cswinmd/CsWinMD.csproj
+++ b/src/Authoring/cswinmd/CsWinMD.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
Major
preview
enable
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 7900d38c8..30bbea813 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -26,15 +26,15 @@
true
false
true
- netcoreapp3.1;net6.0
- netcoreapp3.1;net6.0;net8.0
- netstandard2.0;net6.0;net8.0
- netstandard2.0;net6.0;net8.0
- net6.0;net8.0
- net6.0;net8.0
- net6.0-windows10.0.19041.0;net8.0-windows10.0.19041.0
- net6.0-windows10.0.19041.0
- net6.0;net8.0
+ netcoreapp3.1;net8.0
+ netcoreapp3.1;net8.0
+ netstandard2.0;net8.0
+ netstandard2.0;net8.0
+ net8.0
+ net8.0
+ net8.0-windows10.0.19041.0
+ net8.0-windows10.0.19041.0
+ net8.0
false
@@ -43,7 +43,7 @@
- $(MSBuildThisFileDirectory)Perf\IIDOptimizer\bin\$(Configuration)\net6.0\
+ $(MSBuildThisFileDirectory)Perf\IIDOptimizer\bin\$(Configuration)\net8.0\
diff --git a/src/Perf/IIDOptimizer/IIDOptimizer.csproj b/src/Perf/IIDOptimizer/IIDOptimizer.csproj
index 5872dcbdd..fc0fd2f80 100644
--- a/src/Perf/IIDOptimizer/IIDOptimizer.csproj
+++ b/src/Perf/IIDOptimizer/IIDOptimizer.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
Major
diff --git a/src/Perf/ResultsComparer/ResultsComparer.csproj b/src/Perf/ResultsComparer/ResultsComparer.csproj
index 7d660ad56..6437c29e4 100644
--- a/src/Perf/ResultsComparer/ResultsComparer.csproj
+++ b/src/Perf/ResultsComparer/ResultsComparer.csproj
@@ -2,7 +2,7 @@
Exe
$(PERFLAB_TARGET_FRAMEWORKS)
- net6.0
+ net8.0
latest
diff --git a/src/Projections/Test/TestHost.ProbeByHost.cs b/src/Projections/Test/TestHost.ProbeByHost.cs
index 8c6981d49..3dfb50aaa 100644
--- a/src/Projections/Test/TestHost.ProbeByHost.cs
+++ b/src/Projections/Test/TestHost.ProbeByHost.cs
@@ -7,108 +7,22 @@
using Windows.Foundation;
using WinRT;
-
-#region Temporary, until authoring support generates activation factory support
-
-namespace Windows.Foundation
-{
- [global::WinRT.WindowsRuntimeType]
- [Guid("00000035-0000-0000-c000-000000000046")]
- [WindowsRuntimeHelperType(typeof(global::ABI.Windows.Foundation.IActivationFactory))]
- internal interface IActivationFactory
- {
- Object ActivateInstance();
- }
-}
-
-namespace ABI.Windows.Foundation
-{
-#if !NET
- [global::WinRT.ObjectReferenceWrapper(nameof(_obj))]
-#endif
- [Guid("00000035-0000-0000-c000-000000000046")]
- internal class IActivationFactory : global::Windows.Foundation.IActivationFactory
- {
- public unsafe delegate int ActivateInstance_0(IntPtr thisPtr, out IntPtr instance);
-
- [Guid("00000035-0000-0000-c000-000000000046")]
- public struct Vftbl
- {
- internal IInspectable.Vftbl IInspectableVftbl;
- public ActivateInstance_0 ActivateInstance_0;
-
- private static readonly Vftbl AbiToProjectionVftable;
- public static readonly IntPtr AbiToProjectionVftablePtr;
- static unsafe Vftbl()
- {
- AbiToProjectionVftable = new Vftbl
- {
- IInspectableVftbl = global::WinRT.IInspectable.Vftbl.AbiToProjectionVftable,
- ActivateInstance_0 = Do_Abi_ActivateInstance_0
- };
- var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf() + sizeof(IntPtr) * 1);
- Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false);
- AbiToProjectionVftablePtr = (IntPtr)nativeVftbl;
- }
-
- private static unsafe int Do_Abi_ActivateInstance_0(IntPtr thisPtr, out IntPtr instance)
- {
- object __instance = default;
- instance = default;
- try
- {
- __instance = global::WinRT.ComWrappersSupport.FindObject(thisPtr).ActivateInstance();
- instance = MarshalInspectable
diff --git a/src/Tests/FunctionalTests/CCW/CCW.csproj b/src/Tests/FunctionalTests/CCW/CCW.csproj
index c5e8cd234..c7fe45f74 100644
--- a/src/Tests/FunctionalTests/CCW/CCW.csproj
+++ b/src/Tests/FunctionalTests/CCW/CCW.csproj
@@ -5,7 +5,7 @@
$(FunctionalTestsBuildTFMs)
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
true
diff --git a/src/Tests/FunctionalTests/ClassActivation/ClassActivation.csproj b/src/Tests/FunctionalTests/ClassActivation/ClassActivation.csproj
index 33d0482d3..420191949 100644
--- a/src/Tests/FunctionalTests/ClassActivation/ClassActivation.csproj
+++ b/src/Tests/FunctionalTests/ClassActivation/ClassActivation.csproj
@@ -5,7 +5,7 @@
$(FunctionalTestsBuildTFMs)
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
diff --git a/src/Tests/FunctionalTests/Collections/Collections.csproj b/src/Tests/FunctionalTests/Collections/Collections.csproj
index 3559f5c97..98495ff99 100644
--- a/src/Tests/FunctionalTests/Collections/Collections.csproj
+++ b/src/Tests/FunctionalTests/Collections/Collections.csproj
@@ -5,7 +5,7 @@
$(FunctionalTestsBuildTFMs)
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
diff --git a/src/Tests/FunctionalTests/DerivedClassActivation/DerivedClassActivation.csproj b/src/Tests/FunctionalTests/DerivedClassActivation/DerivedClassActivation.csproj
index 157b9992c..7f0423881 100644
--- a/src/Tests/FunctionalTests/DerivedClassActivation/DerivedClassActivation.csproj
+++ b/src/Tests/FunctionalTests/DerivedClassActivation/DerivedClassActivation.csproj
@@ -5,7 +5,7 @@
$(FunctionalTestsBuildTFMs)
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
diff --git a/src/Tests/FunctionalTests/DerivedClassAsBaseClass/DerivedClassAsBaseClass.csproj b/src/Tests/FunctionalTests/DerivedClassAsBaseClass/DerivedClassAsBaseClass.csproj
index d84c05d8c..4200014b4 100644
--- a/src/Tests/FunctionalTests/DerivedClassAsBaseClass/DerivedClassAsBaseClass.csproj
+++ b/src/Tests/FunctionalTests/DerivedClassAsBaseClass/DerivedClassAsBaseClass.csproj
@@ -5,7 +5,7 @@
$(FunctionalTestsBuildTFMs)
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
diff --git a/src/Tests/FunctionalTests/DynamicInterfaceCasting/DynamicInterfaceCasting.csproj b/src/Tests/FunctionalTests/DynamicInterfaceCasting/DynamicInterfaceCasting.csproj
index d19ce67c4..4db5916f4 100644
--- a/src/Tests/FunctionalTests/DynamicInterfaceCasting/DynamicInterfaceCasting.csproj
+++ b/src/Tests/FunctionalTests/DynamicInterfaceCasting/DynamicInterfaceCasting.csproj
@@ -5,7 +5,7 @@
$(FunctionalTestsBuildTFMs)
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
true
diff --git a/src/Tests/FunctionalTests/Events/Events.csproj b/src/Tests/FunctionalTests/Events/Events.csproj
index 33d0482d3..420191949 100644
--- a/src/Tests/FunctionalTests/Events/Events.csproj
+++ b/src/Tests/FunctionalTests/Events/Events.csproj
@@ -5,7 +5,7 @@
$(FunctionalTestsBuildTFMs)
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
diff --git a/src/Tests/FunctionalTests/JsonValueFunctionCalls/JsonValueFunctionCalls.csproj b/src/Tests/FunctionalTests/JsonValueFunctionCalls/JsonValueFunctionCalls.csproj
index 157b9992c..7f0423881 100644
--- a/src/Tests/FunctionalTests/JsonValueFunctionCalls/JsonValueFunctionCalls.csproj
+++ b/src/Tests/FunctionalTests/JsonValueFunctionCalls/JsonValueFunctionCalls.csproj
@@ -5,7 +5,7 @@
$(FunctionalTestsBuildTFMs)
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
diff --git a/src/Tests/FunctionalTests/NonWinRT/NonWinRT.csproj b/src/Tests/FunctionalTests/NonWinRT/NonWinRT.csproj
index 06d462ead..21513321e 100644
--- a/src/Tests/FunctionalTests/NonWinRT/NonWinRT.csproj
+++ b/src/Tests/FunctionalTests/NonWinRT/NonWinRT.csproj
@@ -5,7 +5,7 @@
$(FunctionalTestsBuildTFMs)
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
true
TEST_UNSAFE_DISABLED
false
diff --git a/src/Tests/FunctionalTests/OptInMode/OptInMode.csproj b/src/Tests/FunctionalTests/OptInMode/OptInMode.csproj
index 51bed49b8..69c29358a 100644
--- a/src/Tests/FunctionalTests/OptInMode/OptInMode.csproj
+++ b/src/Tests/FunctionalTests/OptInMode/OptInMode.csproj
@@ -5,7 +5,7 @@
net8.0
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
OptIn
diff --git a/src/Tests/FunctionalTests/PublishProfiles/win10-arm64.pubxml b/src/Tests/FunctionalTests/PublishProfiles/win-arm64.pubxml
similarity index 98%
rename from src/Tests/FunctionalTests/PublishProfiles/win10-arm64.pubxml
rename to src/Tests/FunctionalTests/PublishProfiles/win-arm64.pubxml
index 8f10dce5b..a590c9248 100644
--- a/src/Tests/FunctionalTests/PublishProfiles/win10-arm64.pubxml
+++ b/src/Tests/FunctionalTests/PublishProfiles/win-arm64.pubxml
@@ -1,14 +1,14 @@
-
-
-
- FileSystem
- arm64
- win-arm64
- bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
- True
- True
- False
- True
- true
-
-
+
+
+
+ FileSystem
+ arm64
+ win-arm64
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ True
+ True
+ False
+ True
+ true
+
+
diff --git a/src/Tests/FunctionalTests/PublishProfiles/win10-x64.pubxml b/src/Tests/FunctionalTests/PublishProfiles/win-x64.pubxml
similarity index 98%
rename from src/Tests/FunctionalTests/PublishProfiles/win10-x64.pubxml
rename to src/Tests/FunctionalTests/PublishProfiles/win-x64.pubxml
index 8d38f63e6..3e4d923a6 100644
--- a/src/Tests/FunctionalTests/PublishProfiles/win10-x64.pubxml
+++ b/src/Tests/FunctionalTests/PublishProfiles/win-x64.pubxml
@@ -1,14 +1,14 @@
-
-
-
- FileSystem
- x64
- win-x64
- bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
- True
- True
- False
- True
- true
-
-
+
+
+
+ FileSystem
+ x64
+ win-x64
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ True
+ True
+ False
+ True
+ true
+
+
diff --git a/src/Tests/FunctionalTests/PublishProfiles/win10-x86.pubxml b/src/Tests/FunctionalTests/PublishProfiles/win-x86.pubxml
similarity index 98%
rename from src/Tests/FunctionalTests/PublishProfiles/win10-x86.pubxml
rename to src/Tests/FunctionalTests/PublishProfiles/win-x86.pubxml
index 1a69d532b..7b68d9aa0 100644
--- a/src/Tests/FunctionalTests/PublishProfiles/win10-x86.pubxml
+++ b/src/Tests/FunctionalTests/PublishProfiles/win-x86.pubxml
@@ -1,14 +1,14 @@
-
-
-
- FileSystem
- x86
- win-x86
- bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
- True
- True
- False
- True
- true
-
-
+
+
+
+ FileSystem
+ x86
+ win-x86
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ True
+ True
+ False
+ True
+ true
+
+
diff --git a/src/Tests/FunctionalTests/Structs/Structs.csproj b/src/Tests/FunctionalTests/Structs/Structs.csproj
index 157b9992c..7f0423881 100644
--- a/src/Tests/FunctionalTests/Structs/Structs.csproj
+++ b/src/Tests/FunctionalTests/Structs/Structs.csproj
@@ -5,7 +5,7 @@
$(FunctionalTestsBuildTFMs)
x86;x64
win-x86;win-x64
- $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml
+ $(MSBuildProjectDirectory)\..\PublishProfiles\win-$(Platform).pubxml
diff --git a/src/Tests/HostTest/BadMappedTarget.Host.runtimeconfig.json b/src/Tests/HostTest/BadMappedTarget.Host.runtimeconfig.json
index 04a2d0f23..904206592 100644
--- a/src/Tests/HostTest/BadMappedTarget.Host.runtimeconfig.json
+++ b/src/Tests/HostTest/BadMappedTarget.Host.runtimeconfig.json
@@ -1,10 +1,10 @@
{
"runtimeOptions": {
- "tfm": "net6.0",
+ "tfm": "net8.0",
"rollForward": "LatestMinor",
"framework": {
"name": "Microsoft.NETCore.App",
- "version": "6.0.0-preview"
+ "version": "8.0.0"
}
},
"activatableClasses": {
diff --git a/src/Tests/HostTest/ClassNotFound.Host.runtimeconfig.json b/src/Tests/HostTest/ClassNotFound.Host.runtimeconfig.json
index 73a4f7d48..12b04bbfe 100644
--- a/src/Tests/HostTest/ClassNotFound.Host.runtimeconfig.json
+++ b/src/Tests/HostTest/ClassNotFound.Host.runtimeconfig.json
@@ -1,10 +1,10 @@
{
"runtimeOptions": {
- "tfm": "net6.0",
+ "tfm": "net8.0",
"rollForward": "LatestMinor",
"framework": {
"name": "Microsoft.NETCore.App",
- "version": "6.0.0-preview"
+ "version": "8.0.0"
}
},
"activatableClasses": {
diff --git a/src/Tests/HostTest/HostTest.vcxproj b/src/Tests/HostTest/HostTest.vcxproj
index dfd15efad..7eaa675ae 100644
--- a/src/Tests/HostTest/HostTest.vcxproj
+++ b/src/Tests/HostTest/HostTest.vcxproj
@@ -60,26 +60,26 @@
{ef3326b5-716f-41d2-ab30-4efab30955e2}
- TargetFramework=net6.0
+ TargetFramework=net8.0
{c6d580c5-7037-4733-b933-916ff400afe2}
- TargetFramework=net6.0
+ TargetFramework=net8.0
{ffa9a78b-f53f-43ee-af87-24a80f4c330a}
- TargetFramework=net6.0
+ TargetFramework=net8.0
{0bb8f82d-874e-45aa-bca3-20ce0562164a}
- TargetFramework=net6.0
+ TargetFramework=net8.0
{7e33bcb7-19c5-4061-981d-ba695322708a}
{25244ced-966e-45f2-9711-1f51e951ff89}
- TargetFramework=net6.0
+ TargetFramework=net8.0
diff --git a/src/Tests/HostTest/MappedTarget.Host.runtimeconfig.json b/src/Tests/HostTest/MappedTarget.Host.runtimeconfig.json
index 79347bff9..e2a488a15 100644
--- a/src/Tests/HostTest/MappedTarget.Host.runtimeconfig.json
+++ b/src/Tests/HostTest/MappedTarget.Host.runtimeconfig.json
@@ -1,10 +1,10 @@
{
"runtimeOptions": {
- "tfm": "net6.0",
+ "tfm": "net8.0",
"rollForward": "LatestMinor",
"framework": {
"name": "Microsoft.NETCore.App",
- "version": "6.0.0-preview"
+ "version": "8.0.0"
}
},
"activatableClasses": {
diff --git a/src/Tests/HostTest/RuntimeFrameworkVersion.csproj b/src/Tests/HostTest/RuntimeFrameworkVersion.csproj
index 75f69eb7d..5a4100cc5 100644
--- a/src/Tests/HostTest/RuntimeFrameworkVersion.csproj
+++ b/src/Tests/HostTest/RuntimeFrameworkVersion.csproj
@@ -1,14 +1,14 @@
- net6.0
+ net8.0
diff --git a/src/Tests/HostTest/Test.Host.runtimeconfig.json b/src/Tests/HostTest/Test.Host.runtimeconfig.json
index 14f127d48..be5d9aa3e 100644
--- a/src/Tests/HostTest/Test.Host.runtimeconfig.json
+++ b/src/Tests/HostTest/Test.Host.runtimeconfig.json
@@ -1,10 +1,10 @@
{
"runtimeOptions": {
- "tfm": "net6.0",
+ "tfm": "net8.0",
"rollForward": "LatestMinor",
"framework": {
"name": "Microsoft.NETCore.App",
- "version": "6.0.0-preview"
+ "version": "8.0.0"
}
}
}
\ No newline at end of file
diff --git a/src/Tests/HostTest/WinRT.Host.runtimeconfig.json b/src/Tests/HostTest/WinRT.Host.runtimeconfig.json
index 14f127d48..be5d9aa3e 100644
--- a/src/Tests/HostTest/WinRT.Host.runtimeconfig.json
+++ b/src/Tests/HostTest/WinRT.Host.runtimeconfig.json
@@ -1,10 +1,10 @@
{
"runtimeOptions": {
- "tfm": "net6.0",
+ "tfm": "net8.0",
"rollForward": "LatestMinor",
"framework": {
"name": "Microsoft.NETCore.App",
- "version": "6.0.0-preview"
+ "version": "8.0.0"
}
}
}
\ No newline at end of file
diff --git a/src/Tests/ObjectLifetimeTests/ObjectLifetimeTests.Lifted.csproj b/src/Tests/ObjectLifetimeTests/ObjectLifetimeTests.Lifted.csproj
index 13a269ab4..568b1dd87 100644
--- a/src/Tests/ObjectLifetimeTests/ObjectLifetimeTests.Lifted.csproj
+++ b/src/Tests/ObjectLifetimeTests/ObjectLifetimeTests.Lifted.csproj
@@ -6,9 +6,9 @@
ObjectLifetimeTests.Lifted
app.manifest
x86;x64;arm64
- win10-x86;win10-x64;win10-arm64
+ win-x86;win-x64;win-arm64
True
- win10-$(Platform).pubxml
+ win-$(Platform).pubxml
false
false
diff --git a/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win10-arm64.pubxml b/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win-arm64.pubxml
similarity index 92%
rename from src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win10-arm64.pubxml
rename to src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win-arm64.pubxml
index 5c3d986e4..7cb800162 100644
--- a/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win10-arm64.pubxml
+++ b/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win-arm64.pubxml
@@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
FileSystem
arm64
- win10-arm64
+ win-arm64
bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
true
False
diff --git a/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win10-x64.pubxml b/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win-x64.pubxml
similarity index 92%
rename from src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win10-x64.pubxml
rename to src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win-x64.pubxml
index 352786e6f..a144a836f 100644
--- a/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win10-x64.pubxml
+++ b/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win-x64.pubxml
@@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
FileSystem
x64
- win10-x64
+ win-x64
bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
true
False
diff --git a/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win10-x86.pubxml b/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win-x86.pubxml
similarity index 92%
rename from src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win10-x86.pubxml
rename to src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win-x86.pubxml
index 68ad82ae0..3d4af2dd6 100644
--- a/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win10-x86.pubxml
+++ b/src/Tests/ObjectLifetimeTests/Properties/PublishProfiles/win-x86.pubxml
@@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
FileSystem
x86
- win10-x86
+ win-x86
bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
true
False
diff --git a/src/WinRT.Runtime/EventRegistrationTokenTable{T}.cs b/src/WinRT.Runtime/EventRegistrationTokenTable{T}.cs
index 690c4c4e5..129797f94 100644
--- a/src/WinRT.Runtime/EventRegistrationTokenTable{T}.cs
+++ b/src/WinRT.Runtime/EventRegistrationTokenTable{T}.cs
@@ -54,7 +54,7 @@ private static int GetTypeOfTHashCode()
// is expected to eventually wrap around, and we don't want to lose the
// additional possible range of negative values (there's no reason for that).
private int m_low32Bits =
-#if NET6_0_OR_GREATER
+#if NET8_0_OR_GREATER
Random.Shared.Next(int.MinValue, int.MaxValue);
#else
new Random().Next(int.MinValue, int.MaxValue);
@@ -109,7 +109,7 @@ public EventRegistrationToken AddEventHandler(T handler)
// where we'll use a different token value).
int tokenLow32Bits;
-#if NET6_0_OR_GREATER
+#if NET8_0_OR_GREATER
do
{
// When on .NET 6+, just iterate on TryAdd, which allows skipping the extra
@@ -147,7 +147,7 @@ public EventRegistrationToken AddEventHandler(T handler)
/// Whether or not a registered event handler could be retrieved and removed from the table.
public bool RemoveEventHandler(
EventRegistrationToken token,
-#if NET6_0_OR_GREATER
+#if NET8_0_OR_GREATER
[NotNullWhen(true)]
#endif
out T? handler)
@@ -169,7 +169,7 @@ public bool RemoveEventHandler(
lock (m_tokens)
{
-#if NET6_0_OR_GREATER
+#if NET8_0_OR_GREATER
// On .NET 6 and above, we can use a single lookup to both check whether the token
// exists in the table, remove it, and also retrieve the removed handler to return.
if (m_tokens.Remove((int)token.Value, out object? obj))
@@ -195,7 +195,7 @@ public bool RemoveEventHandler(
return false;
}
}
-}
-
-// Restore in case this file is merged with others.
+}
+
+// Restore in case this file is merged with others.
#nullable restore
\ No newline at end of file
diff --git a/src/WinRT.Runtime/Platform.cs b/src/WinRT.Runtime/Platform.cs
index 8b54e7b08..ffd8f5c3d 100644
--- a/src/WinRT.Runtime/Platform.cs
+++ b/src/WinRT.Runtime/Platform.cs
@@ -55,7 +55,7 @@ partial class Platform
{
public static bool FreeLibrary(IntPtr moduleHandle)
{
-#if NET6_0_OR_GREATER
+#if NET8_0_OR_GREATER
return LibraryImportStubs.FreeLibrary(moduleHandle);
#else
return FreeLibrary(moduleHandle);
@@ -70,7 +70,7 @@ public static unsafe IntPtr TryGetProcAddress(IntPtr moduleHandle, ReadOnlySpan<
{
fixed (byte* lpFunctionName = functionName)
{
-#if NET6_0_OR_GREATER
+#if NET8_0_OR_GREATER
return LibraryImportStubs.GetProcAddress(moduleHandle, (sbyte*)lpFunctionName);
#else
return GetProcAddress(moduleHandle, (sbyte*)lpFunctionName);
@@ -97,7 +97,7 @@ public static unsafe IntPtr LoadLibraryExW(string fileName, IntPtr fileHandle, u
{
fixed (char* lpFileName = fileName)
{
-#if NET6_0_OR_GREATER
+#if NET8_0_OR_GREATER
return LibraryImportStubs.LoadLibraryExW((ushort*)lpFileName, fileHandle, flags);
#else
return LoadLibraryExW((ushort*)lpFileName, fileHandle, flags);
@@ -109,7 +109,7 @@ public static unsafe IntPtr LoadLibraryExW(string fileName, IntPtr fileHandle, u
}
}
-#if NET6_0_OR_GREATER
+#if NET8_0_OR_GREATER
// Marshalling stubs from [LibraryImport], which are used to get the same semantics (eg. for setting
// the last P/Invoke errors, etc.) on .NET 6 as well ([LibraryImport] was only introduced in .NET 7).
internal static class LibraryImportStubs
diff --git a/src/WinRT.Runtime/WinRT.Runtime.csproj b/src/WinRT.Runtime/WinRT.Runtime.csproj
index e95f467da..cffdb38aa 100644
--- a/src/WinRT.Runtime/WinRT.Runtime.csproj
+++ b/src/WinRT.Runtime/WinRT.Runtime.csproj
@@ -28,22 +28,18 @@
github
-
-
+
+
$(AssemblyVersionNumber)
-
- 2.1.0.0
-
-
true
-
+
@@ -91,7 +87,7 @@
$(MatchingRefApiCompatArgs) --allow-default-interface-methods
-
+
@@ -101,7 +97,7 @@
-
+
<_ReferencePathDirectories Include="@(ReferencePath -> '%(RootDir)%(Directory)')" />
diff --git a/src/benchmark.cmd b/src/benchmark.cmd
index 2a40cd0de..49991002f 100644
--- a/src/benchmark.cmd
+++ b/src/benchmark.cmd
@@ -5,9 +5,9 @@ set path=%DOTNET_ROOT%;%DOTNET_ROOT(x86)%;%path%
nuget restore TestWinRT\Test.sln
nuget restore cswinrt.sln
msbuild Benchmarks\Benchmarks.csproj -t:restore -t:build /p:platform=x64 /p:configuration=release /p:solutiondir=%~dp0 /p:IsDotnetBuild=false
-dotnet %~dp0Benchmarks\bin\x64\Release\net6.0\Benchmarks.dll -filter * --runtimes net6.0
+dotnet %~dp0Benchmarks\bin\x64\Release\net8.0\Benchmarks.dll -filter * --runtimes net8.0
nuget restore Perf\ResultsComparer\ResultsComparer.sln
msbuild Perf\ResultsComparer\ResultsComparer.sln -t:restore -t:build /p:platform="Any CPU" /p:configuration=release
set baselinedir=%1
IF "%baselinedir%" == "" set baselinedir="Perf\BenchmarkBaseline"
-Perf\ResultsComparer\bin\Release\net6.0\ResultsComparer.exe --base %baselinedir% --diff BenchmarkDotNet.Artifacts\results\ --threshold 5%% --xml BenchmarkDotNet.Artifacts\results\comparison.xml
\ No newline at end of file
+Perf\ResultsComparer\bin\Release\net8.0\ResultsComparer.exe --base %baselinedir% --diff BenchmarkDotNet.Artifacts\results\ --threshold 5%% --xml BenchmarkDotNet.Artifacts\results\comparison.xml
\ No newline at end of file
diff --git a/src/build.cmd b/src/build.cmd
index e3f9605fa..5249236e3 100644
--- a/src/build.cmd
+++ b/src/build.cmd
@@ -1,7 +1,7 @@
@echo off
if /i "%cswinrt_echo%" == "on" @echo on
-set CsWinRTBuildNetSDKVersion=6.0.424
+set CsWinRTBuildNetSDKVersion=8.0.303
set CsWinRTBuildNet8SDKVersion=8.0.303
set this_dir=%~dp0
@@ -184,7 +184,7 @@ if "%run_functional_tests%" EQU "true" (
for %%a in (%cswinrt_functional_tests%) do (
echo Publishing %%a
- call :exec %msbuild_path%msbuild.exe /t:publish %cswinrt_build_params% /p:platform=%cswinrt_platform%;configuration=%cswinrt_configuration%;RuntimeIdentifier=win-%cswinrt_platform%;VersionNumber=%cswinrt_version_number%;VersionString=%cswinrt_version_string%;AssemblyVersionNumber=%cswinrt_assembly_version%;GenerateTestProjection=true;BaselineAllAPICompatError=%cswinrt_baseline_breaking_compat_errors%;BaselineAllMatchingRefApiCompatError=%cswinrt_baseline_assembly_version_compat_errors% /p:TargetFramework=net6.0 /p:solutiondir=%this_dir% %this_dir%Tests\FunctionalTests\%%a\%%a.csproj -bl:CCWBin%%a.binlog
+ call :exec %msbuild_path%msbuild.exe /t:publish %cswinrt_build_params% /p:platform=%cswinrt_platform%;configuration=%cswinrt_configuration%;RuntimeIdentifier=win-%cswinrt_platform%;VersionNumber=%cswinrt_version_number%;VersionString=%cswinrt_version_string%;AssemblyVersionNumber=%cswinrt_assembly_version%;GenerateTestProjection=true;BaselineAllAPICompatError=%cswinrt_baseline_breaking_compat_errors%;BaselineAllMatchingRefApiCompatError=%cswinrt_baseline_assembly_version_compat_errors% /p:TargetFramework=net8.0 /p:solutiondir=%this_dir% %this_dir%Tests\FunctionalTests\%%a\%%a.csproj -bl:CCWBin%%a.binlog
)
)
@@ -245,7 +245,7 @@ if ErrorLevel 1 (
rem Running Object Lifetime Unit Tests
echo Running object lifetime tests for %cswinrt_platform% %cswinrt_configuration%
if '%NUGET_PACKAGES%'=='' set NUGET_PACKAGES=%USERPROFILE%\.nuget\packages
-call :exec vstest.console.exe %this_dir%\Tests\ObjectLifetimeTests\bin\%cswinrt_platform%\%cswinrt_configuration%\net8.0-windows10.0.19041.0\win10-%cswinrt_platform%\ObjectLifetimeTests.Lifted.build.appxrecipe /TestAdapterPath:"%NUGET_PACKAGES%\mstest.testadapter\2.2.4-preview-20210513-02\build\_common" /framework:FrameworkUap10 /logger:trx;LogFileName=%this_dir%\VsTestResults.trx
+call :exec vstest.console.exe %this_dir%\Tests\ObjectLifetimeTests\bin\%cswinrt_platform%\%cswinrt_configuration%\net8.0-windows10.0.19041.0\win-%cswinrt_platform%\ObjectLifetimeTests.Lifted.build.appxrecipe /TestAdapterPath:"%NUGET_PACKAGES%\mstest.testadapter\2.2.4-preview-20210513-02\build\_common" /framework:FrameworkUap10 /logger:trx;LogFileName=%this_dir%\VsTestResults.trx
if ErrorLevel 1 (
echo.
echo ERROR: Lifetime test failed, skipping NuGet pack
@@ -293,7 +293,7 @@ if "%run_functional_tests%" EQU "true" (
for %%a in (%cswinrt_functional_tests%) do (
echo Running %%a
- call :exec %this_dir%Tests\FunctionalTests\%%a\bin\%cswinrt_configuration%\net6.0\win-%cswinrt_platform%\publish\%%a.exe
+ call :exec %this_dir%Tests\FunctionalTests\%%a\bin\%cswinrt_configuration%\net8.0\win-%cswinrt_platform%\publish\%%a.exe
if !errorlevel! NEQ 100 (
echo.
echo ERROR: Functional test '%%a' failed with !errorlevel!, skipping NuGet pack
@@ -328,17 +328,16 @@ set cswinrt_bin_dir=%this_dir%_build\%cswinrt_platform%\%cswinrt_configuration%\
set cswinrt_exe=%cswinrt_bin_dir%cswinrt.exe
set interop_winmd=%cswinrt_bin_dir%WinRT.Interop.winmd
set netstandard2_runtime=%this_dir%WinRT.Runtime\bin\%cswinrt_configuration%\netstandard2.0\WinRT.Runtime.dll
-set net6_runtime=%this_dir%WinRT.Runtime\bin\%cswinrt_configuration%\net6.0\WinRT.Runtime.dll
set net8_runtime=%this_dir%WinRT.Runtime\bin\%cswinrt_configuration%\net8.0\WinRT.Runtime.dll
set source_generator=%this_dir%Authoring\WinRT.SourceGenerator\bin\%cswinrt_configuration%\netstandard2.0\WinRT.SourceGenerator.dll
set winrt_host_%cswinrt_platform%=%this_dir%_build\%cswinrt_platform%\%cswinrt_configuration%\WinRT.Host\bin\WinRT.Host.dll
set winrt_host_resource_%cswinrt_platform%=%this_dir%_build\%cswinrt_platform%\%cswinrt_configuration%\WinRT.Host\bin\WinRT.Host.dll.mui
-set winrt_shim=%this_dir%Authoring\WinRT.Host.Shim\bin\%cswinrt_configuration%\net6.0\WinRT.Host.Shim.dll
-set guid_patch=%this_dir%Perf\IIDOptimizer\bin\%cswinrt_configuration%\net6.0\*.*
-set cswinmd_outpath=%this_dir%Authoring\cswinmd\bin\%cswinrt_configuration%\net6.0
+set winrt_shim=%this_dir%Authoring\WinRT.Host.Shim\bin\%cswinrt_configuration%\net8.0\WinRT.Host.Shim.dll
+set guid_patch=%this_dir%Perf\IIDOptimizer\bin\%cswinrt_configuration%\net8.0\*.*
+set cswinmd_outpath=%this_dir%Authoring\cswinmd\bin\%cswinrt_configuration%\net8.0
rem Now call pack
echo Creating nuget package
-call :exec %nuget_dir%\nuget pack %this_dir%..\nuget\Microsoft.Windows.CsWinRT.nuspec -Properties cswinrt_exe=%cswinrt_exe%;interop_winmd=%interop_winmd%;netstandard2_runtime=%netstandard2_runtime%;net6_runtime=%net6_runtime%;net8_runtime=%net8_runtime%;source_generator=%source_generator%;cswinrt_nuget_version=%cswinrt_version_string%;winrt_host_x86=%winrt_host_x86%;winrt_host_x64=%winrt_host_x64%;winrt_host_arm=%winrt_host_arm%;winrt_host_arm64=%winrt_host_arm64%;winrt_host_resource_x86=%winrt_host_resource_x86%;winrt_host_resource_x64=%winrt_host_resource_x64%;winrt_host_resource_arm=%winrt_host_resource_arm%;winrt_host_resource_arm64=%winrt_host_resource_arm64%;winrt_shim=%winrt_shim%;guid_patch=%guid_patch% -OutputDirectory %cswinrt_bin_dir% -NonInteractive -Verbosity Detailed -NoPackageAnalysis
+call :exec %nuget_dir%\nuget pack %this_dir%..\nuget\Microsoft.Windows.CsWinRT.nuspec -Properties cswinrt_exe=%cswinrt_exe%;interop_winmd=%interop_winmd%;netstandard2_runtime=%netstandard2_runtime%;net8_runtime=%net8_runtime%;source_generator=%source_generator%;cswinrt_nuget_version=%cswinrt_version_string%;winrt_host_x86=%winrt_host_x86%;winrt_host_x64=%winrt_host_x64%;winrt_host_arm=%winrt_host_arm%;winrt_host_arm64=%winrt_host_arm64%;winrt_host_resource_x86=%winrt_host_resource_x86%;winrt_host_resource_x64=%winrt_host_resource_x64%;winrt_host_resource_arm=%winrt_host_resource_arm%;winrt_host_resource_arm64=%winrt_host_resource_arm64%;winrt_shim=%winrt_shim%;guid_patch=%guid_patch% -OutputDirectory %cswinrt_bin_dir% -NonInteractive -Verbosity Detailed -NoPackageAnalysis
call :exec %nuget_dir%\nuget pack %this_dir%..\nuget\Microsoft.Windows.CsWinMD.nuspec -Properties cswinmd_outpath=%cswinmd_outpath%;source_generator=%source_generator%;cswinmd_nuget_version=%cswinrt_version_string%; -OutputDirectory %cswinrt_bin_dir% -NonInteractive -Verbosity Detailed -NoPackageAnalysis
goto :eof
diff --git a/src/cswinrt.sln b/src/cswinrt.sln
index 7a02cc529..f74d6d53b 100644
--- a/src/cswinrt.sln
+++ b/src/cswinrt.sln
@@ -133,9 +133,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FunctionalTests", "Function
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PublishProfiles", "PublishProfiles", "{6FBE79A9-9D6D-4436-9F84-797ED1C9F676}"
ProjectSection(SolutionItems) = preProject
- Tests\FunctionalTests\PublishProfiles\win10-arm64.pubxml = Tests\FunctionalTests\PublishProfiles\win10-arm64.pubxml
- Tests\FunctionalTests\PublishProfiles\win10-x64.pubxml = Tests\FunctionalTests\PublishProfiles\win10-x64.pubxml
- Tests\FunctionalTests\PublishProfiles\win10-x86.pubxml = Tests\FunctionalTests\PublishProfiles\win10-x86.pubxml
+ Tests\FunctionalTests\PublishProfiles\win-arm64.pubxml = Tests\FunctionalTests\PublishProfiles\win-arm64.pubxml
+ Tests\FunctionalTests\PublishProfiles\win-x64.pubxml = Tests\FunctionalTests\PublishProfiles\win-x64.pubxml
+ Tests\FunctionalTests\PublishProfiles\win-x86.pubxml = Tests\FunctionalTests\PublishProfiles\win-x86.pubxml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassActivation", "Tests\FunctionalTests\ClassActivation\ClassActivation.csproj", "{F0D6034B-5368-4B13-BBB9-4ABBC535AA0E}"
diff --git a/src/cswinrt/code_writers.h b/src/cswinrt/code_writers.h
index 37d90807d..66de79821 100644
--- a/src/cswinrt/code_writers.h
+++ b/src/cswinrt/code_writers.h
@@ -10210,7 +10210,7 @@ switch (runtimeClassId)
// just calling it. Otherwise, we switch on the string parameter, and generate a dummy ReadOnlySpan
// overload just allocating and calling that. We always need both exports to make sure that hosting
// scenarios also work, since those will be looking up the string overload via reflection.
- settings.net7_0_or_greater ? "ReadOnlySpan" : "string",
+ settings.netstandard_compat ? "string" : "ReadOnlySpan",
bind_each([](writer& w, TypeDef const& type)
{
w.write(R"(
@@ -10224,15 +10224,15 @@ bind(type, typedef_name_type::CCW, true)
},
types
),
- settings.net7_0_or_greater ? R"(
-public static IntPtr GetActivationFactory(string runtimeClassId)
+ settings.netstandard_compat ? R"(
+public static IntPtr GetActivationFactory(ReadOnlySpan runtimeClassId)
{
- return GetActivationFactory(runtimeClassId.AsSpan());
+ return GetActivationFactory(runtimeClassId.ToString());
}
)" : R"(
-public static IntPtr GetActivationFactory(ReadOnlySpan runtimeClassId)
+public static IntPtr GetActivationFactory(string runtimeClassId)
{
- return GetActivationFactory(runtimeClassId.ToString());
+ return GetActivationFactory(runtimeClassId.AsSpan());
}
)");
}
diff --git a/src/cswinrt/main.cpp b/src/cswinrt/main.cpp
index 942d5bbf7..e7c65b848 100644
--- a/src/cswinrt/main.cpp
+++ b/src/cswinrt/main.cpp
@@ -34,7 +34,7 @@ namespace cswinrt
{ "include", 0, option::no_max, "", "One or more prefixes to include in projection" },
{ "exclude", 0, option::no_max, "", "One or more prefixes to exclude from projection" },
{ "addition_exclude", 0, option::no_max, "", "One or more namespace prefixes to exclude from the projection additions" },
- { "target", 0, 1, "", "Target TFM for projection. Omit for compatibility with .NET 6." },
+ { "target", 0, 1, "", "Target TFM for projection (.NET 8 is the default)" },
{ "component", 0, 0, {}, "Generate component projection." },
{ "verbose", 0, 0, {}, "Show detailed progress information" },
{ "internal", 0, 0, {}, "Generates a private projection."},
@@ -94,12 +94,16 @@ Where is one or more of:
settings.verbose = args.exists("verbose");
auto target = args.value("target");
- if (!target.empty() && target != "netstandard2.0" && !starts_with(target, "net5.0") && !starts_with(target, "net6.0") && !starts_with(target, "net7.0") && !starts_with(target, "net8.0"))
+ if (!target.empty() && target != "netstandard2.0" && !starts_with(target, "net8.0"))
{
throw usage_exception();
}
+ else if (target.empty())
+ {
+ // Default to .NET 8 if no explicit target is set
+ target = "net8.0";
+ }
settings.netstandard_compat = target == "netstandard2.0";
- settings.net7_0_or_greater = starts_with(target, "net7.0") || starts_with(target, "net8.0");
settings.component = args.exists("component");
settings.internal = args.exists("internal");
settings.embedded = args.exists("embedded");
diff --git a/src/cswinrt/settings.h b/src/cswinrt/settings.h
index 5b944955a..4c7b9243a 100644
--- a/src/cswinrt/settings.h
+++ b/src/cswinrt/settings.h
@@ -13,7 +13,6 @@ namespace cswinrt
winmd::reader::filter filter;
winmd::reader::filter addition_filter;
bool netstandard_compat{};
- bool net7_0_or_greater{};
bool component{};
bool internal{};
bool embedded{};