Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netstandard 2 build changes #918

Merged
merged 7 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 9 additions & 51 deletions az-templates/stage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,13 @@ stages:
projects: 'src/*.sln'
arguments: '-c $(BuildConfiguration) --no-incremental --nologo -p:TreatWarningsAsErrors=true -p:Version=$(SemVer) -p:InformationalVersion=$(InfoVer)'

# - task: VSTest@2
# displayName: 'UnitTests .NetCoreApp3.1'
# inputs:
# testSelector: 'testAssemblies'
# testAssemblyVer2: 'src/Tests/UnitTests/bin/$(BuildConfiguration)/netcoreapp3.1/UnitTests.dll'
# configuration: $(BuildConfiguration)
# testRunTitle: 'UnitTests .NetCoreApp3.1'

- task: VSTest@2
displayName: 'UnitTests .Net4.6'
displayName: 'UnitTests Net Standard 2.0'
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: 'src/Tests/UnitTests/bin/$(BuildConfiguration)/net46/UnitTests.dll'
testAssemblyVer2: 'src/Tests/UnitTests/bin/$(BuildConfiguration)/net462/UnitTests.dll'
configuration: $(BuildConfiguration)
testRunTitle: 'UnitTests .Net4.6'
testRunTitle: 'UnitTests Net Standard 2.0'

- task: PowerShell@2
displayName: 'Install Dependencies'
Expand All @@ -46,63 +38,29 @@ stages:
Write-Host "Appending nats-server directory $nats to path."
Write-Host "##vso[task.setvariable variable=PATH;]${env:PATH};$nats"

# - task: VSTest@2
# displayName: 'IntegrationTests .NetCoreApp3.1'
# env:
# GODEBUG: x509sha1=1
# inputs:
# testSelector: 'testAssemblies'
# testAssemblyVer2: 'src/Tests/IntegrationTests/bin/$(BuildConfiguration)/netcoreapp3.1/IntegrationTests.dll'
# configuration: $(BuildConfiguration)
# rerunFailedTests: True
# rerunMaxAttempts: 2
# testRunTitle: 'IntegrationTests .NetCoreApp3.1'

- task: VSTest@2
displayName: 'IntegrationTests .Net4.6'
displayName: 'IntegrationTests Net Standard 2.0'
env:
GODEBUG: x509sha1=1
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: 'src/Tests/IntegrationTests/bin/$(BuildConfiguration)/net46/IntegrationTests.dll'
testAssemblyVer2: 'src/Tests/IntegrationTests/bin/$(BuildConfiguration)/net462/IntegrationTests.dll'
configuration: $(BuildConfiguration)
rerunFailedTests: True
rerunMaxAttempts: 2
testRunTitle: 'IntegrationTests .Net4.6'

# - task: VSTest@2
# displayName: 'IntegrationTests Internal .NetCoreApp3.1'
# env:
# GODEBUG: x509sha1=1
# inputs:
# testSelector: 'testAssemblies'
# testAssemblyVer2: 'src/Tests/IntegrationTestsInternal/bin/$(BuildConfiguration)/netcoreapp3.1/IntegrationTestsInternal.dll'
# configuration: $(BuildConfiguration)
# rerunFailedTests: True
# rerunMaxAttempts: 2
# testRunTitle: 'IntegrationTests Internal .NetCoreApp3.1'
testRunTitle: 'IntegrationTests Net Standard 2.0'

- task: VSTest@2
displayName: 'IntegrationTests Internal .Net4.6'
displayName: 'IntegrationTests Internal Net Standard 2.0'
env:
GODEBUG: x509sha1=1
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: 'src/Tests/IntegrationTestsInternal/bin/$(BuildConfiguration)/net46/IntegrationTestsInternal.dll'
testAssemblyVer2: 'src/Tests/IntegrationTestsInternal/bin/$(BuildConfiguration)/net462/IntegrationTestsInternal.dll'
configuration: $(BuildConfiguration)
rerunFailedTests: True
rerunMaxAttempts: 2
testRunTitle: 'IntegrationTests Internal .Net4.6'

# - task: VSTest@2
# displayName: 'IntegrationTests Using Nito AsyncEx .NetCoreApp3.1'
# inputs:
# testSelector: 'testAssemblies'
# testAssemblyVer2: 'src/Tests/IntegrationTestsUsingNitoAsyncEx/bin/$(BuildConfiguration)/netcoreapp3.1/IntegrationTestsUsingNitoAsyncEx.dll'
# configuration: $(BuildConfiguration)
# rerunFailedTests: True
# rerunMaxAttempts: 2
# testRunTitle: 'IntegrationTests Using Nito AsyncEx .NetCoreApp3.1'
testRunTitle: 'IntegrationTests Internal Net Standard 2.0'

- task: DotNetCoreCLI@2
displayName: 'Pack Nupkg'
Expand Down
3 changes: 1 addition & 2 deletions src/Benchmarks/MicroBenchmarks/MicroBenchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">netcoreapp3.1;net462</TargetFrameworks>
<TargetFramework>net462</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
Expand Down
3 changes: 1 addition & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project>
<PropertyGroup>
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">netcoreapp3.1;net46</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netcoreapp3.1</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>0.0.0</Version>
<Company>CNCF</Company>
<Authors>The NATS Authors</Authors>
Expand Down
3 changes: 1 addition & 2 deletions src/NATS.Client/NATS.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">netstandard1.6;netstandard2.0;net46</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netstandard1.6;netstandard2.0</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<Title>NATS .NET Client</Title>
<Description>**NOTE** For .NET 6 upwards we recommend NATS.Net package - NATS acts as a central nervous system for distributed systems at scale for IoT, edge computing, and cloud native and on-premise applications. This is the .NET client API.</Description>
<PackageId>NATS.Client</PackageId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">netstandard1.6;net46</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netcoreapp3.1;netstandard1.6</TargetFrameworks>
<Title>NATS JetStream Example Utils</Title>
<PackageId>NATS.JetStreamExampleUtils</PackageId>
<Description>NATS JetStream Example Utils Library</Description>
Expand All @@ -11,13 +9,6 @@
<RootNamespace>NATSExamples</RootNamespace>
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework) == 'netstandard1.6'">
<PackageReference Include="System.Net.Security" Version="4.3.2" />
<PackageReference Include="System.Reflection.Extensions" Version="4.3.0" />
<PackageReference Include="System.Runtime" Version="4.3.1" />
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
Expand Down
1 change: 0 additions & 1 deletion src/Samples/WinFormsSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ static class Program
[STAThread]
static void Main()
{
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
Expand Down
2 changes: 1 addition & 1 deletion src/Samples/WinFormsSample/WinFormsSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.WindowsDesktop" Condition="$(OS) == 'Windows_NT'" />

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFramework>net462</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
1 change: 1 addition & 0 deletions src/Tests/IntegrationTests/IntegrationTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand All @@ -14,7 +15,7 @@
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<ItemGroup>
<PackageReference Include="Nito.AsyncEx" Version="5.1.0" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions src/Tests/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand Down
Loading