Skip to content

Commit 12c6c65

Browse files
authored
Moving VC to .NET 8 (#214)
* Moving VC to .NET 8 * remove trim flag * Fix Build error * Add global json * Fix reflection issue
1 parent 224ba04 commit 12c6c65

File tree

70 files changed

+278
-341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+278
-341
lines changed

.buildenv/BuildEnv.targets

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

4-
<!-- **********************************************************************
5-
Environment and Test targets
6-
*********************************************************************** -->
7-
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets"
8-
Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets') and '$(TestProject)' == 'true'" />
9-
10-
114
<Target Name="CompileInProjectMetadata" BeforeTargets="CreateGeneratedAssemblyInfoInputsCacheFile" Condition="'$(GenerateProjectMetadata)' == 'true' and '$(GenerateAssemblyInfo)' == 'true'">
125

136
<!--

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Setup .NET
3232
uses: actions/setup-dotnet@v3
3333
with:
34-
dotnet-version: 6.0.x
34+
dotnet-version: 8.0.x
3535

3636
- name: Restore dependencies
3737
run: ./build-restore.cmd

.pipelines/azure-pipelines-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ resources:
1616
options: --entrypoint=""
1717

1818
variables:
19-
VcVersion : 1.13.0
19+
VcVersion : 1.13.1
2020
ROOT: $(Build.SourcesDirectory)
2121
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
2222
ENABLE_PRS_DELAYSIGN: 1
@@ -33,7 +33,7 @@ stages:
3333
continueOnError: false
3434
inputs:
3535
packageType: 'sdk'
36-
version: '6.0.406'
36+
version: '8.0.0'
3737
useGlobalJson: false
3838
performMultiLevelLookup: true
3939
workingDirectory: '$(Build.SourcesDirectory)'

.pipelines/azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pool:
1818
vmImage: windows-latest
1919

2020
variables:
21-
VcVersion : 1.13.0
21+
VcVersion : 1.13.1
2222
ROOT: $(Build.SourcesDirectory)
2323
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
2424
ENABLE_PRS_DELAYSIGN: 1
@@ -35,7 +35,7 @@ steps:
3535
continueOnError: false
3636
inputs:
3737
packageType: 'sdk'
38-
version: '6.0.406'
38+
version: '8.0.0'
3939
useGlobalJson: false
4040
performMultiLevelLookup: true
4141
workingDirectory: '$(Build.SourcesDirectory)'

build.cmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ if /i "%VCBuildVersion%" == "" (
2020

2121
set VCSolutionDir=%~dp0src\VirtualClient
2222

23-
set TrimFlag="-p:PublishTrimmed=true -p:TrimUnusedDependencies=true"
23+
set TrimFlag="-p:PublishTrimmed=true"
24+
set TrimFlag=""
2425
if /i "%~1" == "noTrim" set TrimFlag=""
2526

2627
call %VCSolutionDir%\build-stage-packaging-tools.cmd && echo: || Goto :Error

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.100",
4+
"rollForward": "disable"
5+
}
6+
}

src/VirtualClient/Module.props

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,19 @@
6969
<Microsoft_Diagnostics_Tracing_TraceEvent_PackageVersion>2.0.61</Microsoft_Diagnostics_Tracing_TraceEvent_PackageVersion>
7070

7171
<!-- Microsoft.Extensions.Configuration -->
72-
<Microsoft_Extensions_Configuration_PackageVersion>7.0.0</Microsoft_Extensions_Configuration_PackageVersion>
72+
<Microsoft_Extensions_Configuration_PackageVersion>8.0.0</Microsoft_Extensions_Configuration_PackageVersion>
7373

7474
<!-- Microsoft.Extensions.Configuration.Json -->
75-
<Microsoft_Extensions_Configuration_Json_PackageVersion>7.0.0</Microsoft_Extensions_Configuration_Json_PackageVersion>
75+
<Microsoft_Extensions_Configuration_Json_PackageVersion>8.0.0</Microsoft_Extensions_Configuration_Json_PackageVersion>
7676

7777
<!-- Microsoft.Extensions.DependencyInjection -->
78-
<Microsoft_Extensions_DependencyInjection_PackageVersion>7.0.0</Microsoft_Extensions_DependencyInjection_PackageVersion>
78+
<Microsoft_Extensions_DependencyInjection_PackageVersion>8.0.0</Microsoft_Extensions_DependencyInjection_PackageVersion>
7979

8080
<!-- Microsoft.Extensions.Logging -->
81-
<Microsoft_Extensions_Logging_PackageVersion>7.0.0</Microsoft_Extensions_Logging_PackageVersion>
81+
<Microsoft_Extensions_Logging_PackageVersion>8.0.0</Microsoft_Extensions_Logging_PackageVersion>
8282

8383
<!-- Microsoft.Extensions.Logging.Console -->
84-
<Microsoft_Extensions_Logging_Console_PackageVersion>7.0.0</Microsoft_Extensions_Logging_Console_PackageVersion>
84+
<Microsoft_Extensions_Logging_Console_PackageVersion>8.0.0</Microsoft_Extensions_Logging_Console_PackageVersion>
8585

8686
<!-- Microsoft.NET.Test.Sdk -->
8787
<Microsoft_NET_Test_Sdk_PackageVersion>17.0.0</Microsoft_NET_Test_Sdk_PackageVersion>
@@ -156,7 +156,7 @@
156156
<System_Net_NameResolution_PackageVersion>4.3.0</System_Net_NameResolution_PackageVersion>
157157

158158
<!-- System.Reflection.Metadata -->
159-
<System_Reflection_Metadata_PackageVersion>6.0.0</System_Reflection_Metadata_PackageVersion>
159+
<System_Reflection_Metadata_PackageVersion>8.0.0</System_Reflection_Metadata_PackageVersion>
160160

161161
<!-- System.Security.Principal.Windows -->
162162
<System_Security_Principal_Windows_PackageVersion>5.0.0</System_Security_Principal_Windows_PackageVersion>
@@ -166,16 +166,6 @@
166166

167167
</PropertyGroup>
168168

169-
<!--
170-
*****************************************************************************
171-
Ensure the target .NET Core runtime is explicitly defined to avoid issues
172-
between NuGet package restores and build.
173-
*****************************************************************************
174-
-->
175-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
176-
<RuntimeFrameworkVersion>6.0.14</RuntimeFrameworkVersion>
177-
</PropertyGroup>
178-
179169
<!--
180170
******************************************************************************
181171

src/VirtualClient/VirtualClient.Actions.FunctionalTests/VirtualClient.Actions.FunctionalTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<RunCodeAnalysis>false</RunCodeAnalysis>
77
<RunAnalyzers>true</RunAnalyzers>

src/VirtualClient/VirtualClient.Actions.UnitTests/Examples/DotNetBuildOutput/AspNetBuildExample.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
55
/home/anyuser/vc/packages/aspnetbenchmarks/src/Benchmarks/Benchmarks.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Mvc.NewtonsoftJson does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
66
Restored /home/anyuser/vc/packages/aspnetbenchmarks/src/Benchmarks/Benchmarks.csproj (in 837 ms).
77
/home/anyuser/vc/packages/aspnetbenchmarks/src/Benchmarks/Benchmarks.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Mvc.NewtonsoftJson does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
8-
Benchmarks -> /home/anyuser/vc/packages/aspnetbenchmarks/src/Benchmarks/bin/Release/net6.0/Benchmarks.dll
8+
Benchmarks -> /home/anyuser/vc/packages/aspnetbenchmarks/src/Benchmarks/bin/Release/net8.0/Benchmarks.dll
99

1010
Build succeeded.
1111

src/VirtualClient/VirtualClient.Actions.UnitTests/VirtualClient.Actions.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<RunCodeAnalysis>false</RunCodeAnalysis>
77
<RunAnalyzers>false</RunAnalyzers>

0 commit comments

Comments
 (0)