Skip to content

Commit f696138

Browse files
Add .NET 8.0 as Target Framework, migrate TOM (#54)
* Update .NET SDK version in global.json to 8.0.400 * Add net8.0 as target frameworks * Update project properties and CI build settings * Migrate TOM from the legacy `.retail.amd64` to the newer multi-runtime packages * Update test projects dependencies * Refactor CI pipeline for .NET 8 * Add dependabot.yml
1 parent dd77b10 commit f696138

7 files changed

Lines changed: 58 additions & 49 deletions

File tree

.azure/pipelines/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,15 @@ steps:
4040
inputs:
4141
secureFile: 'DaxTemplate.snk'
4242
- task: UseDotNet@2
43-
displayName: '.NET setup'
43+
displayName: 'Install .NET SDK'
4444
inputs:
4545
packageType: sdk
46-
version: 6.0.x
46+
useGlobalJson: true
47+
- task: UseDotNet@2
48+
displayName: 'Install .NET 6.0 runtime'
49+
inputs:
50+
packageType: runtime
51+
version: '6.0.x'
4752
- task: DotNetCoreCLI@2
4853
displayName: '.NET restore'
4954
inputs:

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "nuget"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 10
8+
assignees:
9+
- "albertospelta"
10+
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"
15+
open-pull-requests-limit: 10
16+
assignees:
17+
- "albertospelta"

.github/workflows/ci.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: CI
1+
name: ci
2+
23
on:
34
push:
45
branches:
@@ -7,8 +8,7 @@ on:
78
branches:
89
- main
910
workflow_dispatch:
10-
env:
11-
CONFIGURATION: 'Release'
11+
1212
jobs:
1313
build-and-test:
1414
name: build-and-test--${{ matrix.os-version }}
@@ -18,17 +18,16 @@ jobs:
1818
os-version: [windows-latest] #, ubuntu-latest, macos-latest]
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: .NET setup
22-
uses: actions/setup-dotnet@v1
21+
- uses: actions/setup-dotnet@v4
2322
with:
24-
dotnet-version: 6.0.x
25-
- name: .NET info
26-
run: dotnet --info
27-
- name: .NET restore
23+
dotnet-version: |
24+
6.0.x
25+
global-json-file: global.json
26+
- name: restore
2827
run: dotnet restore ./src
29-
- name: .NET build
30-
run: dotnet build ./src/Dax.Template.sln --configuration ${{ env.CONFIGURATION }} --no-restore
31-
- name: .NET test
32-
run: dotnet test ./src/Dax.Template.Tests/Dax.Template.Tests.csproj --configuration ${{ env.CONFIGURATION }} --no-build --verbosity normal
33-
- name: .NET pack
34-
run: dotnet pack ./src/Dax.Template/Dax.Template.csproj --configuration ${{ env.CONFIGURATION }} --no-build --no-restore --verbosity normal
28+
- name: build
29+
run: dotnet build ./src/Dax.Template.sln --configuration Release --no-restore
30+
- name: test
31+
run: dotnet test ./src/Dax.Template.Tests/Dax.Template.Tests.csproj --configuration Release --no-build --verbosity normal
32+
- name: pack
33+
run: dotnet pack ./src/Dax.Template/Dax.Template.csproj --configuration Release --no-build --no-restore --verbosity normal

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "6.0.100",
3+
"version": "8.0.400",
44
"allowPrerelease": false,
55
"rollForward": "latestFeature"
66
}

src/Dax.Template.TestUI/Dax.Template.TestUI.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net6.0-windows</TargetFramework>
5+
<TargetFramework>net8.0-windows</TargetFramework>
66
<Nullable>enable</Nullable>
77
<UseWindowsForms>true</UseWindowsForms>
88
<ImplicitUsings>enable</ImplicitUsings>
99
<IsPackable>false</IsPackable>
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
13+
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

src/Dax.Template.Tests/Dax.Template.Tests.csproj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0</TargetFrameworks>
5-
<!--TargetFrameworks>net461;net6.0</TargetFrameworks-->
6-
<LangVersion>latest</LangVersion>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
5+
<LangVersion>12.0</LangVersion>
76
<Nullable>enable</Nullable>
87
<IsPackable>false</IsPackable>
98
</PropertyGroup>
109

1110
<ItemGroup>
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
13-
<PackageReference Include="xunit" Version="2.4.1" />
14-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
12+
<PackageReference Include="xunit" Version="2.9.2" />
13+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1514
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1615
<PrivateAssets>all</PrivateAssets>
1716
</PackageReference>
18-
<PackageReference Include="coverlet.collector" Version="3.1.2">
17+
<PackageReference Include="coverlet.collector" Version="6.0.2">
1918
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2019
<PrivateAssets>all</PrivateAssets>
2120
</PackageReference>
Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0</TargetFrameworks>
5-
<!--TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks-->
6-
<LangVersion>latest</LangVersion>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
5+
<LangVersion>12.0</LangVersion>
76
<Nullable>enable</Nullable>
87
<NeutralLanguage>en-US</NeutralLanguage>
98
<IsPackable>true</IsPackable>
@@ -26,42 +25,32 @@
2625
<PackageIcon>package-icon.png</PackageIcon>
2726
<PackageReadmeFile>README.md</PackageReadmeFile>
2827
<PackageLicenseExpression>MIT</PackageLicenseExpression>
29-
<PackageIconUrl>https://raw.githubusercontent.com/sql-bi/DaxTemplate/main/src/package-icon.png</PackageIconUrl>
3028
<PackageProjectUrl>https://github.com/sql-bi/DaxTemplate</PackageProjectUrl>
3129
<RepositoryUrl>https://github.com/sql-bi/DaxTemplate</RepositoryUrl>
30+
<RepositoryType>git</RepositoryType>
31+
<RepositoryBranch>main</RepositoryBranch>
3232
<PublishRepositoryUrl>true</PublishRepositoryUrl>
3333
<EmbedUntrackedSources>true</EmbedUntrackedSources>
34-
<DebugSymbols>true</DebugSymbols>
3534
<DebugType>embedded</DebugType>
36-
<IncludeSymbols>false</IncludeSymbols>
37-
<Deterministic>true</Deterministic>
35+
</PropertyGroup>
36+
37+
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
3838
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
3939
</PropertyGroup>
40-
40+
4141
<ItemGroup>
4242
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="\" />
4343
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
4444
<None Include="..\..\package-icon.png" Pack="true" PackagePath="\" />
4545
</ItemGroup>
46-
46+
4747
<ItemGroup>
48-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
49-
<PrivateAssets>all</PrivateAssets>
50-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
51-
</PackageReference>
52-
<PackageReference Include="Microsoft.AnalysisServices.AdomdClient.NetCore.retail.amd64" Version="19.77.0" />
53-
<PackageReference Include="Microsoft.AnalysisServices.NetCore.retail.amd64" Version="19.77.0" />
48+
<PackageReference Include="Microsoft.AnalysisServices.AdomdClient" Version="19.86.6" />
49+
<PackageReference Include="Microsoft.AnalysisServices" Version="19.86.6" />
5450
</ItemGroup>
5551

5652
<PropertyGroup>
5753
<DefineConstants>$(AdditionalConstants)</DefineConstants>
5854
</PropertyGroup>
5955

60-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
61-
<AssemblyTitle>Dax.Template .NET Standard 2.0</AssemblyTitle>
62-
</PropertyGroup>
63-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
64-
<AssemblyTitle>Dax.Template .NET 6.0</AssemblyTitle>
65-
</PropertyGroup>
66-
6756
</Project>

0 commit comments

Comments
 (0)