Skip to content

Commit

Permalink
Updated project targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Oct 29, 2024
1 parent 9897ca7 commit 626faa4
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
run: |
dotnet test Tests/CSharpCore/Tests.NetStandard.csproj --configuration Release --no-build /p:AltCover=true /p:AltCoverStrongNameKey=../../SharpSnmpLib/sharpsnmplib.snk /p:AltCoverAssemblyFilter='^(xunit)|(AltCover)|(SharpSnmpLib\.Tests)'
dotnet tool install --global dotnet-reportgenerator-globaltool
reportgenerator -reports:${{ github.workspace }}\Tests\CSharpCore\coverage.net6.0.xml -targetdir:${{ github.workspace }}\TestResults -reporttypes:lcov
reportgenerator -reports:${{ github.workspace }}\Tests\CSharpCore\coverage.net8.0.xml -targetdir:${{ github.workspace }}\TestResults -reporttypes:lcov
- name: Publish coverage report to coveralls.io
uses: coverallsapp/github-action@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/Samples/CSharpCore/snmpd/bin/Debug/net6.0/snmpd.dll",
"program": "${workspaceFolder}/Samples/CSharpCore/snmpd/bin/Debug/net8.0/snmpd.dll",
"args": [],
"cwd": "${workspaceFolder}/Samples/CSharpCore/snmpd",
"console": "internalConsole",
Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharpCore/BytesViewer/BytesViewer.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharpCore/snmpbulkget/snmpbulkget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharpCore/snmpd/snmpd.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharpCore/snmpdiscover/snmpdiscover.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharpCore/snmpget/snmpget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharpCore/snmpgetnext/snmpgetnext.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharpCore/snmpsendtrap/snmpsendtrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharpCore/snmpset/snmpset.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharpCore/snmptrapd/snmptrapd.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharpCore/snmpwalk/snmpwalk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
13 changes: 10 additions & 3 deletions Tests/CSharpCore/Tests.NetStandard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@
</PropertyGroup>
<PropertyGroup>
<OutputType Condition="'$(TargetFramework)'!='net471'">Exe</OutputType>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildAssemblyVersion)' == '17.0' ">net6.0;net471</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildAssemblyVersion)' == '16.0' ">net471</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">net6.0</TargetFrameworks>
<!-- Detect SDK version -->
<ParsedSdkVersion>$([System.Text.RegularExpressions.Regex]::Replace($(NETCoreSdkVersion), '-.*', ''))</ParsedSdkVersion>
<IsNet60Supported Condition="'$(ParsedSdkVersion)' >= '6.0'">true</IsNet60Supported>
<IsNet80Supported Condition="'$(ParsedSdkVersion)' >= '8.0'">true</IsNet80Supported>
<IsNet90Supported Condition="'$(ParsedSdkVersion)' >= '9.0'">true</IsNet90Supported>
<!-- Only support .NET 6/8/9 and .NET Framework 4.7.1 right now. -->
<TargetFrameworks Condition="'$(IsNet60Supported)' == 'true' ">net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(IsNet80Supported)' == 'true' ">($TargetFrameworks);net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(IsNet90Supported)' == 'true' ">($TargetFrameworks);net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">($TargetFrameworks);net471</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="**\*.resx" />
Expand Down

0 comments on commit 626faa4

Please sign in to comment.