Skip to content

Commit

Permalink
Update to .net8 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
szilvaa authored Jun 22, 2024
1 parent 49c656f commit ec5457b
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>
2 changes: 2 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<Project>
</Project>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For clients with straightforward needs one high level API client is provided in

### Requirements

- [.NET 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) or later
- [.NET 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) or later
- A registered app on the [Forge Developer Portal](http://forge.autodesk.com).

### Dependencies
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<authors>Autodesk Forge</authors>
<owners>Autodesk Forge</owners>
<Company>Autodesk</Company>
<Product>Autodesk Forge</Product>
<Description>Client sdk for Forge DesignAutomation API</Description>
<Copyright>Autodesk Inc.</Copyright>
<Version>5.1.2</Version>
<PackageId>Autodesk.Forge.DesignAutomation</PackageId>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Autodesk-Forge/forge-api-dotnet-design.automation</PackageProjectUrl>
<PackageIcon>logo_forge-2-line.png</PackageIcon>
<PackageReleaseNotes>For full release notes see https://github.com/Autodesk-Forge/forge-api-dotnet-design.automation/blob/master/CHANGELOG.md</PackageReleaseNotes>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageVersion>6.0.0</PackageVersion>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\images\logo_forge-2-line.png" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autodesk.Forge.Core" Version="3.0.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Autodesk.Forge.Core" Version="4.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<Import Project="..\..\nuget.targets" />
</Project>

20 changes: 20 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Autodesk</Authors>
<Copyright>Autodesk Inc.</Copyright>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Autodesk-Forge/forge-api-dotnet-core</PackageProjectUrl>
<PackageIcon>logo_forge-2-line.png</PackageIcon>
<PackageReleaseNotes>For full release notes see https://github.com/Autodesk-Forge/forge-api-dotnet-core/blob/master/CHANGELOG.md</PackageReleaseNotes>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\images\logo_forge-2-line.png" Pack="true" PackagePath="\" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
9 changes: 5 additions & 4 deletions nuget.targets → src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />
<!-- Push the nuget package that this project builds to nuget.org
Ignore exit code so failures including the value of NugetApiKey do not get echo-ed.
Continue on errors. Publishing can fail if the package version isn't updated and we get conflict.
-->
<Target Name="Push" DependsOnTargets="Pack">
<Exec Command="dotnet nuget push @(NuGetPackOutput->WithMetadataValue('Extension','.nupkg')) -k=$(NugetApiKey) -s nuget.org --skip-duplicate"
IgnoreExitCode="false"
ContinueOnError="false"/>
<Exec Command="dotnet nuget push @(NuGetPackOutput->WithMetadataValue('Extension','.nupkg')) -k=$(NugetApiKey) -s nuget.org"
IgnoreExitCode="true"
ContinueOnError="true"/>
</Target>
</Project>
10 changes: 5 additions & 5 deletions tests/e2e/E2eTests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<IsPackable>false</IsPackable>
Expand All @@ -18,11 +18,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autodesk.Forge.Core.E2eTestHelpers" Version="3.0.1" />
<PackageReference Include="Autodesk.Forge.Core.E2eTestHelpers" Version="4.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/TestActivities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public partial class Tests

[Fact]
[Order(Weight = 2.0)]
public async void Activities_Create()
public async Task Activities_Create()
{
using (Fixture.StartTestScope())
{
Expand All @@ -59,7 +59,7 @@ public async void Activities_Create()

[Fact]
[Order(Weight = 2.1)]
public async void Activities_GetAll()
public async Task Activities_GetAll()
{
using (Fixture.StartTestScope())
{
Expand Down
10 changes: 5 additions & 5 deletions tests/e2e/TestAppBundlesApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public partial class Tests

[Fact]
[Order(Weight = 1.0)]
public async void AppBundles_Create()
public async Task AppBundles_Create()
{
using (Fixture.StartTestScope())
{
Expand All @@ -44,7 +44,7 @@ public async void AppBundles_Create()

[Fact]
[Order(Weight = 1.1)]
public async void AppBundles_Update()
public async Task AppBundles_Update()
{
using (Fixture.StartTestScope())
{
Expand All @@ -58,7 +58,7 @@ public async void AppBundles_Update()

[Fact]
[Order(Weight = 1.2)]
public async void AppBundles_GetAll()
public async Task AppBundles_GetAll()
{
using (Fixture.StartTestScope())
{
Expand All @@ -73,7 +73,7 @@ public async void AppBundles_GetAll()

[Fact]
[Order(Weight = 1.3)]
public async void AppBundles_GetAllAlias()
public async Task AppBundles_GetAllAlias()
{
using (Fixture.StartTestScope())
{
Expand All @@ -86,7 +86,7 @@ public async void AppBundles_GetAllAlias()

[Fact]
[Order(Weight = 1.4)]
public async void AppBundles_GetAllVersion()
public async Task AppBundles_GetAllVersion()
{
using (Fixture.StartTestScope())
{
Expand Down
10 changes: 5 additions & 5 deletions tests/e2e/TestForgeAppsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public partial class Tests

[Fact]
[Order(Weight = 0.0)]
public async void ForgeApps_Delete()
public async Task ForgeApps_Delete()
{
using (var scope = Fixture.StartTestScope())
{
Expand All @@ -44,7 +44,7 @@ public async void ForgeApps_Delete()

[Fact]
[Order(Weight = 0.1)]
public async void ForgeApps_CreateNickname()
public async Task ForgeApps_CreateNickname()
{
using (Fixture.StartTestScope())
{
Expand All @@ -54,7 +54,7 @@ public async void ForgeApps_CreateNickname()

[Fact]
[Order(Weight = 0.2)]
public async void ForgeApps_GetNickname()
public async Task ForgeApps_GetNickname()
{
using (Fixture.StartTestScope())
{
Expand All @@ -65,7 +65,7 @@ public async void ForgeApps_GetNickname()

[Fact]
[Order(Weight = 0.3)]
public async void ForgeApps_CreateNicknameRecord()
public async Task ForgeApps_CreateNicknameRecord()
{
using (Fixture.StartTestScope())
{
Expand All @@ -75,7 +75,7 @@ public async void ForgeApps_CreateNicknameRecord()

[Fact]
[Order(Weight = 0.4)]
public async void ForgeApps_GetNicknameRecord()
public async Task ForgeApps_GetNicknameRecord()
{
using (Fixture.StartTestScope())
{
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/TestServiceLimits.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public partial class Tests
{
[Fact]
[Order(Weight = 3.0)]
public async void ServiceLimits_Get()
public async Task ServiceLimits_Get()
{
using (Fixture.StartTestScope())
{
Expand All @@ -37,7 +37,7 @@ public async void ServiceLimits_Get()

[Fact]
[Order(Weight = 3.1)]
public async void ServiceLimits_Update()
public async Task ServiceLimits_Update()
{
using (Fixture.StartTestScope())
{
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/TestWorkitems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public partial class Tests
{
[Fact]
[Order(Weight = 3.0)]
public async void WorkItems_Create()
public async Task WorkItems_Create()
{
using (var testScope = Fixture.StartTestScope())
{
Expand Down Expand Up @@ -60,7 +60,7 @@ public async void WorkItems_Create()

[Fact]
[Order(Weight = 3.0)]
public async void WorkItems_CreateWithStringPayload()
public async Task WorkItems_CreateWithStringPayload()
{
using (var testScope = Fixture.StartTestScope())
{
Expand Down

0 comments on commit ec5457b

Please sign in to comment.