Skip to content

Commit d09ca91

Browse files
committed
Target newer frameworks and SDKs
Also drop MSBuild.Sdk.Extras
1 parent 499b25e commit d09ca91

File tree

9 files changed

+29
-27
lines changed

9 files changed

+29
-27
lines changed

azure-pipelines.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
trigger:
22
branches:
3-
include: ["master"]
3+
include:
4+
- master
45
paths:
5-
exclude: ["doc", "*.md", ".appveyor.yml", ".travis.yml"]
6+
exclude: ["doc", "*.md"]
67

78
variables:
89
# TreatWarningsAsErrors: true
@@ -12,14 +13,19 @@ variables:
1213

1314
jobs:
1415
- job: Windows
15-
pool: Hosted VS2017
16+
pool: Hosted Windows 2019 with VS2019
1617
steps:
1718
- script: |
1819
dotnet tool install --tool-path . nbgv
1920
.\nbgv cloud -p src
2021
displayName: Set build number
2122
condition: ne(variables['system.pullrequest.isfork'], true)
2223
24+
- task: UseDotNet@2
25+
displayName: Install .NET Core SDK
26+
inputs:
27+
version: 2.2.401
28+
2329
- script: dotnet --info
2430
displayName: Show dotnet SDK info
2531

@@ -35,7 +41,7 @@ jobs:
3541
# Use VSBuild on Windows so GitLink will work (it fails on dotnet build)
3642
- task: VSBuild@1
3743
inputs:
38-
vsVersion: 15.0
44+
vsVersion: "16.0"
3945
msbuildArgs: /t:build,pack /m /v:m /bl:"$(Build.ArtifactStagingDirectory)/build_logs/msbuild.binlog"
4046
platform: $(BuildPlatform)
4147
configuration: $(BuildConfiguration)

src/Directory.Build.targets

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
</PropertyGroup>
55
<ItemGroup>
66
<PackageReference Update="CodeGeneration.Roslyn.Attributes" Version="$(CodeGenerationRoslynVersion)" />
7-
<PackageReference Update="CodeGeneration.Roslyn" Version="$(CodeGenerationRoslynVersion)" />
87
<PackageReference Update="CodeGeneration.Roslyn.BuildTime" Version="$(CodeGenerationRoslynVersion)" />
8+
<PackageReference Update="CodeGeneration.Roslyn" Version="$(CodeGenerationRoslynVersion)" />
9+
<PackageReference Update="Microsoft.Build" Version="14.3.0" />
910
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.9.0" />
11+
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.2.0" />
1012
<PackageReference Update="System.Collections.Immutable" Version="1.5.0" />
1113
<PackageReference Update="System.Diagnostics.Contracts" Version="4.3.0" />
12-
<PackageReference Update="Validation" Version="2.4.18" />
13-
<PackageReference Update="Microsoft.Build" Version="14.3.0" />
14-
<PackageReference Update="xunit" Version="2.3.1" />
15-
<PackageReference Update="xunit.runner.visualstudio" Version="2.3.1" />
14+
<PackageReference Update="Validation" Version="2.4.22" />
15+
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.1" />
16+
<PackageReference Update="xunit" Version="2.4.1" />
1617
</ItemGroup>
1718
<ItemGroup>
1819
<DotNetCliToolReference Update="dotnet-codegen" Version="$(CodeGenerationRoslynVersion)" />

src/ImmutableObjectGraph.Generation.Attributes/ImmutableObjectGraph.Generation.Attributes.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<Project Sdk="MSBuild.Sdk.Extras">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<RootNamespace>ImmutableObjectGraph.Generation</RootNamespace>
4-
<TargetFrameworks>netstandard1.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
55
<Description>The runtime components behind the types generated with the ImmutableObjectGraph.Generation package.</Description>
66

77
<!-- This gets included in ImmutableObjectGraph.Generation -->

src/ImmutableObjectGraph.Generation.Tests/ImmutableObjectGraph.Generation.Tests.csproj

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net461</TargetFramework>
4-
5-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
6-
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
3+
<TargetFrameworks>net472</TargetFrameworks>
74
</PropertyGroup>
85
<ItemGroup>
96
<Compile Update="TestSources\AbstractClassMidTypeHierarchyWithRequiredField.cs">
@@ -85,6 +82,7 @@
8582
<PackageReference Include="xunit" />
8683
<PackageReference Include="xunit.runner.visualstudio" />
8784
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" PrivateAssets="all" />
85+
<PackageReference Include="Microsoft.NET.Test.Sdk" />
8886
<PackageReference Include="CodeGeneration.Roslyn" PrivateAssets="all" />
8987
</ItemGroup>
9088
<ItemGroup>
@@ -95,4 +93,4 @@
9593
<ProjectReference Include="..\ImmutableObjectGraph.Generation\ImmutableObjectGraph.Generation.csproj" />
9694
<ProjectReference Include="..\ImmutableObjectGraph\ImmutableObjectGraph.csproj" />
9795
</ItemGroup>
98-
</Project>
96+
</Project>

src/ImmutableObjectGraph.Generation/ImmutableObjectGraph.Generation.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<RootNamespace>ImmutableObjectGraph.Generation</RootNamespace>
4-
<TargetFramework>netstandard1.6</TargetFramework>
4+
<TargetFramework>netstandard2.0</TargetFramework>
55
<Description>MSBuild-based code generator to transform simple mutable type definitions into fully functional immutable types with persistent characteristics.</Description>
66

77
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
@@ -57,4 +57,4 @@
5757
<NuspecProperties>id=$(PackageId);version=$(NuGetPackageVersion);authors=$(Authors);copyright=$(Copyright);tags=$(PackageTags);requireLicenseAcceptance=$(PackageRequireLicenseAcceptance);licenseUrl=$(PackageLicenseUrl);description=$(Description);CodeGenerationRoslynVersion=$(CodeGenerationRoslynVersion);Configuration=$(Configuration);OutDir=$(OutDir)</NuspecProperties>
5858
</PropertyGroup>
5959
</Target>
60-
</Project>
60+
</Project>

src/ImmutableObjectGraph.Generation/ImmutableObjectGraph.Generation.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<copyright>$Copyright$</copyright>
1212
<tags>$PackageTags$</tags>
1313
<dependencies>
14-
<group targetFramework=".NETStandard1.0">
14+
<group targetFramework=".NETStandard2.0">
1515
<dependency id="CodeGeneration.Roslyn.BuildTime" version="$CodeGenerationRoslynVersion$" />
1616
<dependency id="ImmutableObjectGraph" version="$version$" />
1717
</group>
@@ -25,6 +25,6 @@
2525
<file src="..\..\lib\netstandard1.0\CG.Pluralization.dll" target="tools\" />
2626
<file src="Readme.txt" target="Readme.txt" />
2727
<file src="build\*" target="build\" />
28-
<file src="..\..\bin\ImmutableObjectGraph.Generation.Attributes\$Configuration$\netstandard1.0\ImmutableObjectGraph.Generation.Attributes.dll" target="lib\netstandard1.0\" />
28+
<file src="..\..\bin\ImmutableObjectGraph.Generation.Attributes\$Configuration$\netstandard2.0\ImmutableObjectGraph.Generation.Attributes.dll" target="lib\netstandard2.0\" />
2929
</files>
3030
</package>

src/ImmutableObjectGraph/ImmutableObjectGraph.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<Project Sdk="MSBuild.Sdk.Extras">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard1.0</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
44
</PropertyGroup>
55
<ItemGroup>
66
<PackageReference Include="Validation" PrivateAssets="compile" />

src/RoslynDemo/RoslynDemo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net461</TargetFramework>
3+
<TargetFramework>net472</TargetFramework>
44
<OutputType>Exe</OutputType>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>

src/global.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"sdk": {
3-
"version": "2.1.402"
4-
},
5-
"msbuild-sdks": {
6-
"MSBuild.Sdk.Extras": "1.5.4"
3+
"version": "2.2.401"
74
}
85
}

0 commit comments

Comments
 (0)