Skip to content

Commit

Permalink
target dotnet 8
Browse files Browse the repository at this point in the history
  • Loading branch information
alnlarsen committed Apr 19, 2024
1 parent 1f10c70 commit 22a4578
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 21 deletions.
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<LangVersion>8</LangVersion>
<LangVersion>10</LangVersion>
<Configurations>Debug;Release</Configurations>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<IsDebug>false</IsDebug>
<OpenTapAppTargetFramework>net6.0</OpenTapAppTargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<OpenTapAppTargetFramework>net8</OpenTapAppTargetFramework>
<TargetFramework>net8</TargetFramework>
<TargetFrameworkIdentifier></TargetFrameworkIdentifier>
<TargetFrameworkVersion></TargetFrameworkVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' != 'Unix'">
<!-- .net462 revert: on windows we build -->
<OpenTapAppTargetFramework>net472</OpenTapAppTargetFramework>
<OpenTapAppTargetFramework>net8</OpenTapAppTargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
Expand Down
4 changes: 2 additions & 2 deletions Package.UnitTests/PackageDefTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void CreatePackage_NoBinFiles()
File.Delete(outputFilename);
}
}
#if NET6_0

[Test]
public void CreatePackageVersioningMono()
{
Expand All @@ -277,7 +277,7 @@ public void CreatePackageVersioningMono()
Assert.AreEqual("0.1.2", FileVersionInfo.GetVersionInfo(tmpFile).ProductVersion, "GetVersionInfo().ProductVersion");
Assert.AreEqual("0.1.2", FileSystemHelper.GetAssemblyVersion(tmpFile), "FileSystemHelper.GetAssemblyVersion");
}
#endif

[Test]
public void CreatePackageDepVersions()
{
Expand Down
2 changes: 1 addition & 1 deletion Shared/tap.runtimeconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"runtimeOptions": {
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
"version": "8.0.0"
},

"applyPatches": true,
Expand Down
12 changes: 8 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<Owner>OpenTAP</Owner>
<!-- Common files -->
<Files Condition="$(Debug) == false">
<File Condition="$(Platform) != Windows" Path="tap.runtimeconfig.json"/>
<File Condition="$(Platform) != Windows" Path="tap.dll">
<File Path="tap.runtimeconfig.json"/>
<File Path="tap.dll">
<SetAssemblyInfo Attributes="Version" />
<Sign Certificate="Keysight Technologies, Inc" Condition="$(Sign)==true"/>
</File>
Expand All @@ -41,8 +41,8 @@
</Files>
<!-- For debug builds. Includes debugging symbols and puts all the DLLs in the OpenTAP root directory. -->
<Files Condition="$(Debug) == true">
<File Condition="$(Platform) != Windows" Path="tap.runtimeconfig.json"/>
<File Condition="$(Platform) != Windows" Path="tap.dll"/>
<File Path="tap.runtimeconfig.json"/>
<File Path="tap.dll"/>
<File Path="tap.pdb"/>
<File Path="OpenTap.dll"/>
<File Path="OpenTap.pdb"/>
Expand All @@ -68,7 +68,11 @@
<Sign Certificate="Keysight Technologies, Inc" Condition="$(Sign)==true"/>
</File>
<!-- The tap upgrader is only necessary on Windows because we cannot overwrite tap.exe otherwise -->
<File Path="Packages/OpenTAP/Tap.Upgrader.runtimeconfig.json" SourcePath="Tap.Upgrader.runtimeconfig.json"/>
<File Path="Packages/OpenTAP/Tap.Upgrader.exe" SourcePath="Tap.Upgrader.exe">
<Sign Certificate="Keysight Technologies, Inc" Condition="$(Sign)==true"/>
</File>
<File Path="Packages/OpenTAP/Tap.Upgrader.dll" SourcePath="Tap.Upgrader.dll">
<SetAssemblyInfo Attributes="Version"/>
<Sign Certificate="Keysight Technologies, Inc" Condition="$(Sign)==true"/>
</File>
Expand Down
2 changes: 1 addition & 1 deletion sdk/Examples/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PropertyGroup>
<!-- Ensure that all projects in this solution use the same version of OpenTAP -->
<OpenTapVersion>$(GitVersion)</OpenTapVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- If your plugin is Windows only and you use Windows specific API's, feel free to change "netstandard2.0" below to "net462" and everything will work as when you are debugging. In this case, remember to change "OS" in package.xml to only "windows" -->
<!-- If your plugin should be cross platform but does not build in release mode, please verify that all API's you used are available. You might need references or nuget packages for API's that are available in NET framework, but not in NetStandard -->
<OpenTapPackageDefinitionPath>package.xml</OpenTapPackageDefinitionPath>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net8</TargetFramework>
<Configurations>Debug;Release;Debug CE</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion sdk/OpenTap.Sdk.MSBuild/OpenTap.Sdk.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>Keysight.OpenTap.Sdk.MSBuild</RootNamespace>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8</TargetFramework>
<TargetFrameworkIdentifier></TargetFrameworkIdentifier>
<TargetFrameworkVersion></TargetFrameworkVersion>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions sdk/OpenTap.Sdk.New/Resources/csprojTemplate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworkIdentifier></TargetFrameworkIdentifier>
<TargetFrameworkVersion></TargetFrameworkVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8</TargetFramework>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -17,4 +17,4 @@
<ItemGroup>
<PackageReference Include="OpenTAP" Version="$(OpenTapVersion)" />
</ItemGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions templates/src/project/ProjectName.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<TargetFrameworkIdentifier></TargetFrameworkIdentifier>
<TargetFrameworkVersion></TargetFrameworkVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8</TargetFramework>
<DebugWith>TapEditor</DebugWith>
</PropertyGroup>

Expand All @@ -28,7 +28,7 @@
To ensure maximum compatibility, we recommend targetting netstandard2.0 in release builds, unless you need specific
APIs that are not available in netstandard2.0.
-->
<TargetFramework>net472</TargetFramework>
<TargetFramework>net8</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/NoAssemblyInfo.TapPlan
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
&lt;PropertyGroup&gt;
&lt;TargetFrameworkIdentifier&gt;&lt;/TargetFrameworkIdentifier&gt;
&lt;TargetFrameworkVersion&gt;&lt;/TargetFrameworkVersion&gt;
&lt;TargetFramework&gt;netstandard2.0&lt;/TargetFramework&gt;
&lt;TargetFramework&gt;net8&lt;/TargetFramework&gt;
&lt;AppendTargetFrameworkToOutputPath&gt;false&lt;/AppendTargetFrameworkToOutputPath&gt;
&lt;CopyLocalLockFileAssemblies&gt;true&lt;/CopyLocalLockFileAssemblies&gt;
&lt;OutputPath&gt;bin/Debug&lt;/OutputPath&gt;
Expand Down
4 changes: 2 additions & 2 deletions tests/package-create-error.TapPlan
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
&lt;PropertyGroup&gt;
&lt;TargetFrameworkIdentifier&gt;&lt;/TargetFrameworkIdentifier&gt;
&lt;TargetFrameworkVersion&gt;&lt;/TargetFrameworkVersion&gt;
&lt;TargetFramework&gt;netstandard2.0&lt;/TargetFramework&gt;
&lt;TargetFramework&gt;net8&lt;/TargetFramework&gt;
&lt;AppendTargetFrameworkToOutputPath&gt;false&lt;/AppendTargetFrameworkToOutputPath&gt;
&lt;CopyLocalLockFileAssemblies&gt;true&lt;/CopyLocalLockFileAssemblies&gt;
&lt;OutputPath&gt;bin/Debug&lt;/OutputPath&gt;
Expand Down Expand Up @@ -244,4 +244,4 @@
</TestStep>
</Steps>
<BreakConditions>Inherit</BreakConditions>
</TestPlan>
</TestPlan>

0 comments on commit 22a4578

Please sign in to comment.