Skip to content

Commit a944c3f

Browse files
authored
Change netcore tfm to net8.0 for C# dev kit (#9406)
1 parent 5dd937b commit a944c3f

File tree

9 files changed

+18
-17
lines changed

9 files changed

+18
-17
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,6 @@ dotnet_diagnostic.CA1307.severity = suggestion # Specify StringComparison
440440

441441
# NETCOREUNDONE: Should be removed when obsolete System.Xaml types are moved from Microsoft.VisualStudio.ProjectSystem.XamlTypes into official package
442442
# Disabling warning for C# files generated from xaml rules
443-
[artifacts/*/obj/Microsoft.VisualStudio.ProjectSystem.Managed/net7.0/*.cs]
443+
[artifacts/*/obj/Microsoft.VisualStudio.ProjectSystem.Managed/net8.0/*.cs]
444444
# CS0618: Type or member is obsolete
445445
dotnet_diagnostic.CS0618.severity = silent

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<PropertyGroup>
2323
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
2424
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
25+
<NetCoreTargetFramework>net8.0</NetCoreTargetFramework>
2526
<!--
2627
IMPORTANT: The reason we use 99.0.0 is because we need a version number that will always be above the published version of the assemblies/packages.
2728
This causes VS to always prefer our locally build packages for debugging (F5) purposes.

eng/imports/HostAgnostic.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<!-- CPS -->
2929
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem" />
3030
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem.Sdk.Tools" PrivateAssets="all" />
31-
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem.XamlTypes" Condition="'$(TargetFramework)' == 'net7.0'" />
31+
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem.XamlTypes" Condition="'$(TargetFramework)' == '$(NetCoreTargetFramework)'" />
3232
<PackageReference Include="Microsoft.VisualStudio.Threading" />
3333
<PackageReference Include="Microsoft.VisualStudio.Validation" />
3434
<PackageReference Include="System.Threading.Tasks.Dataflow" />

eng/pipelines/templates/build-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
inputs:
3131
packageType: runtime
3232
# This should match the target of our unit test projects.
33-
version: 7.0.x
33+
version: 8.0.x
3434

3535
# Allows for accessing the internal AzDO feed (vs-impl-internal) for project restore via Azure Artifacts Credential Provider.
3636
# See: https://github.com/microsoft/artifacts-credprovider#automatic-usage

src/Microsoft.VisualStudio.ProjectSystem.Managed/Microsoft.VisualStudio.ProjectSystem.Managed.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- The value of RuleInjectionClassName of XamlPropertyRule items defined by this project -->
99
<XamlPropertyRuleInjectionClassName>ProjectProperties</XamlPropertyRuleInjectionClassName>
1010
<IsManagedProjectSystemProject>true</IsManagedProjectSystemProject>
11-
<TargetFrameworks>net472;net7.0</TargetFrameworks>
11+
<TargetFrameworks>net472;$(NetCoreTargetFramework)</TargetFrameworks>
1212

1313
<!-- Nuget -->
1414
<IsPackable>true</IsPackable>
@@ -18,15 +18,15 @@
1818
<NoWarn>$(NoWarn);NU5125</NoWarn>
1919
</PropertyGroup>
2020

21-
<PropertyGroup Condition="'$(TargetFramework)' == 'net7.0'">
21+
<PropertyGroup Condition="'$(TargetFramework)' == '$(NetCoreTargetFramework)'">
2222
<!-- Sets the DependsOn for NPM packaging. We use the designated target to select the files to pack. -->
2323
<!-- See: https://dev.azure.com/devdiv/DevDiv/_git/vs-green?path=/components&anchor=packaging-components -->
2424
<StageForNpmPackDependsOn>$(StageForNpmPackDependsOn);AddFilesForNpmPackage</StageForNpmPackDependsOn>
2525
<NpmPackageOutputPath>$(PackageOutputPath)</NpmPackageOutputPath>
2626
</PropertyGroup>
2727

2828
<!-- TODO: Re-enable nullability and clean up warnings. -->
29-
<PropertyGroup Condition="'$(TargetFramework)' == 'net7.0'">
29+
<PropertyGroup Condition="'$(TargetFramework)' == '$(NetCoreTargetFramework)'">
3030
<Nullable>annotations</Nullable>
3131
<NoWarn>$(NoWarn);RS0037</NoWarn>
3232
</PropertyGroup>
@@ -55,7 +55,7 @@
5555
<PackageReference Include="Microsoft.CodeAnalysis.Common" GeneratePathProperty="true" />
5656
</ItemGroup>
5757

58-
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
58+
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreTargetFramework)'">
5959
<!-- Package for creating an NPM package during build. -->
6060
<!-- See: https://dev.azure.com/devdiv/DevDiv/_git/vs-green?path=/components&anchor=packaging-components -->
6161
<PackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.NpmPack" PrivateAssets="all" />
@@ -641,9 +641,9 @@
641641
<AdditionalFiles Include="PublicAPI\net472\*.txt" />
642642
</ItemGroup>
643643

644-
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
645-
<None Remove="PublicAPI\net7.0\*.txt" />
646-
<AdditionalFiles Include="PublicAPI\net7.0\*.txt" />
644+
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreTargetFramework)'">
645+
<None Remove="PublicAPI\$(NetCoreTargetFramework)\*.txt" />
646+
<AdditionalFiles Include="PublicAPI\$(NetCoreTargetFramework)\*.txt" />
647647
</ItemGroup>
648648

649649
<ItemGroup>
@@ -652,7 +652,7 @@
652652
</None>
653653
</ItemGroup>
654654

655-
<Target Name="AddFilesForNpmPackage" DependsOnTargets="Build;SatelliteDllsProjectOutputGroup" Condition="'$(TargetFramework)' == 'net7.0'">
655+
<Target Name="AddFilesForNpmPackage" DependsOnTargets="Build;SatelliteDllsProjectOutputGroup" Condition="'$(TargetFramework)' == '$(NetCoreTargetFramework)'">
656656
<ItemGroup>
657657
<NpmContent Include="exports.json" />
658658
<!-- We have a runtime dependency on Microsoft.CodeAnalysis.dll in VS Code scenarios. -->
File renamed without changes.
File renamed without changes.

tests/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
</PropertyGroup>
1010

1111
<PropertyGroup>
12-
<TargetFrameworks>net472;net7.0</TargetFrameworks>
12+
<TargetFrameworks>net472;$(NetCoreTargetFramework)</TargetFrameworks>
1313
</PropertyGroup>
1414

1515
<!-- TODO: Re-enable nullability and clean up warnings. -->
16-
<PropertyGroup Condition="'$(TargetFramework)' == 'net7.0'">
16+
<PropertyGroup Condition="'$(TargetFramework)' == '$(NetCoreTargetFramework)'">
1717
<Nullable>annotations</Nullable>
1818
<NoWarn>$(NoWarn);RS0037</NoWarn>
1919
</PropertyGroup>
2020

21-
<!-- TODO: Remove this once ImageMoniker and related types are available in a net7.0-compatible package. -->
22-
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
21+
<!-- TODO: Remove this once ImageMoniker and related types are available in a net8.0-compatible package. -->
22+
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreTargetFramework)'">
2323
<!--<PackageReference Remove="Microsoft.VisualStudio.SDK.EmbedInteropTypes" />
2424
<PackageReference Remove="Microsoft.VisualStudio.ImageCatalog" />-->
2525

tests/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests/Setup/PackageContentTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE.md file in the project root for more information.
22

3-
// The NPM package is only relevant to the net7.0 build.
3+
// The NPM package is only relevant to the net8.0 build.
44
#if NETCOREAPP
55

66
using Microsoft.VisualStudio.Utilities;
@@ -36,7 +36,7 @@ private static IEnumerable<string> GetNpmPackageContents()
3636
config,
3737
"obj",
3838
"Microsoft.VisualStudio.ProjectSystem.Managed",
39-
"net7.0",
39+
"net8.0",
4040
"npmsrc");
4141

4242
return Directory.EnumerateFiles(packagesDirectory, "*", SearchOption.AllDirectories)

0 commit comments

Comments
 (0)