Skip to content

Commit

Permalink
Update DefaultTestFrameworks to net472 (#4613)
Browse files Browse the repository at this point in the history
Co-authored-by: Brennan <brecon@microsoft.com>
  • Loading branch information
halter73 and BrennanConroy committed Jan 14, 2022
1 parent ec70d5f commit 7f53f26
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Expand Up @@ -30,7 +30,7 @@
<PackageSigningCertName>MicrosoftNuGet</PackageSigningCertName>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>latest</LangVersion>
<DefaultTestFrameworks>net461</DefaultTestFrameworks>
<DefaultTestFrameworks>net472</DefaultTestFrameworks>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>

<!-- Disable warning about SemVer 2.0 versions -->
Expand Down Expand Up @@ -76,4 +76,4 @@
</ItemGroup>

<Import Project="build\arcade.props" />
</Project>
</Project>
3 changes: 2 additions & 1 deletion build/repo.props
@@ -1,4 +1,5 @@
<Project>
<Import Project="..\Directory.Build.props" Condition="Exists('..\Directory.Build.props')" />
<Import Project="$(RepositoryRoot)build\loc\Localization.props" Condition="'$(Localize)' == 'true'" />

<Import Project="$(MSBuildThisFileDirectory)\arcade.props" />
Expand Down Expand Up @@ -26,4 +27,4 @@
<ExcludeFromPack Include="$(RepositoryRoot)src\Microsoft.AspNet.SignalR.Stress\Microsoft.AspNet.SignalR.Stress.csproj" />
<ExcludeFromPack Include="$(RepositoryRoot)src\Microsoft.AspNet.SignalR.StressServer\Microsoft.AspNet.SignalR.StressServer.csproj" />
</ItemGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions build/repo.targets
Expand Up @@ -90,6 +90,6 @@

<Target Name="RunBrowserTests">
<Message Text="Running JavaScript client Browser tests" Importance="high" />
<Exec Command="npm test -- --server-path &quot;$(ArtifactsBinDir)\Microsoft.AspNet.SignalR.Client.JS.Tests\net461\Microsoft.AspNet.SignalR.Client.JS.Tests.exe&quot;" WorkingDirectory="$(RepositoryRoot)test/Microsoft.AspNet.SignalR.Client.JS.Tests" IgnoreStandardErrorWarningFormat="true" />
<Exec Command="npm test -- --server-path &quot;$(ArtifactsBinDir)\Microsoft.AspNet.SignalR.Client.JS.Tests\$(DefaultTestFrameworks)\Microsoft.AspNet.SignalR.Client.JS.Tests.exe&quot;" WorkingDirectory="$(RepositoryRoot)test/Microsoft.AspNet.SignalR.Client.JS.Tests" IgnoreStandardErrorWarningFormat="true" />
</Target>
</Project>
</Project>
8 changes: 4 additions & 4 deletions src/Microsoft.AspNet.SignalR.Core/TaskAsyncHelper.cs
Expand Up @@ -1039,7 +1039,7 @@ internal static Task ContinueWithPreservedCulture(this Task task, Action<Task> c
#if NETSTANDARD1_3
// The Thread class is not available on .NET Standard 1.3
return task.ContinueWith(continuationAction, continuationOptions);
#elif NETSTANDARD2_0 || NET40 || NET45 || NET461
#elif NETSTANDARD2_0 || NET40 || NET45 || NET461 || NET472
var preservedCulture = SaveCulture();
return task.ContinueWith(t => RunWithPreservedCulture(preservedCulture, continuationAction, t), continuationOptions);
#else
Expand All @@ -1052,7 +1052,7 @@ internal static Task ContinueWithPreservedCulture<T>(this Task<T> task, Action<T
#if NETSTANDARD1_3
// The Thread class is not available on .NET Standard 1.3
return task.ContinueWith(continuationAction, continuationOptions);
#elif NETSTANDARD2_0 || NET40 || NET45 || NET461
#elif NETSTANDARD2_0 || NET40 || NET45 || NET461 || NET472
var preservedCulture = SaveCulture();
return task.ContinueWith(t => RunWithPreservedCulture(preservedCulture, continuationAction, t), continuationOptions);
#else
Expand All @@ -1066,7 +1066,7 @@ internal static Task ContinueWithPreservedCulture<T>(this Task<T> task, Action<T
#if NETSTANDARD1_3
// The Thread class is not available on .NET Standard 1.3
return task.ContinueWith(continuationAction, continuationOptions);
#elif NETSTANDARD2_0 || NET40 || NET45 || NET461
#elif NETSTANDARD2_0 || NET40 || NET45 || NET461 || NET472
var preservedCulture = SaveCulture();
return task.ContinueWith(t => RunWithPreservedCulture(preservedCulture, continuationAction, t), continuationOptions);
#else
Expand Down Expand Up @@ -1366,7 +1366,7 @@ public static void Dispatch(Action action)
{
action();
}, state: null);
#elif NET45 || NETSTANDARD1_3 || NETSTANDARD2_0 || NET461 // Stress uses this component and builds on net461
#elif NET45 || NETSTANDARD1_3 || NETSTANDARD2_0 || NET461 || NET472 // Stress uses this component and builds on net461
Task.Run(() =>
{
action();
Expand Down
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>$(DefaultTestFrameworks)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Remove="obj\**" />
Expand Down

0 comments on commit 7f53f26

Please sign in to comment.