Skip to content

Commit

Permalink
update nugets to .Net Core 3
Browse files Browse the repository at this point in the history
  • Loading branch information
olmobrutall committed Sep 26, 2019
1 parent 1c8ca4a commit 48cdba0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 37 deletions.
9 changes: 1 addition & 8 deletions Signum.Engine/Signum.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Data.SqlClient" Version="4.6.1" />
<PackageReference Include="System.Data.SqlClient" Version="4.7.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Signum.Entities\Signum.Entities.csproj" />
<ProjectReference Include="..\Signum.Utilities\Signum.Utilities.csproj" />
</ItemGroup>

<Target Name="SignumAfterCompile" AfterTargets="AfterCompile" Outputs="$(TargetPath)">
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumReferences.txt" Lines="@(ReferencePath)" Overwrite="true" Encoding="Unicode" />
<Exec command="dotnet &quot;D:\Signum\southwind\Framework\Signum.MSBuildTask\bin\x64\Debug\netcoreapp2.1\Signum.MSBuildTask.dll&quot; &quot;@(IntermediateAssembly)&quot; &quot;$(BaseIntermediateOutputPath)SignumReferences.txt&quot;" ConsoleToMSBuild="false">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>
</Project>
16 changes: 5 additions & 11 deletions Signum.Entities/Signum.Entities.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>preview</LangVersion>
Expand All @@ -10,26 +10,20 @@
<NoWarn>NU1605</NoWarn>
</PropertyGroup>



<ItemGroup>
<PackageReference Include="Signum.Analyzer" Version="2.4.5" />
<PackageReference Include="Signum.MSBuildTask" Version="1.0.7" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Signum.Utilities\Signum.Utilities.csproj" />
</ItemGroup>

<ItemGroup>
<ItemGroup>
<None Update="Translations\*.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="SignumAfterCompile" AfterTargets="AfterCompile" Outputs="$(TargetPath)">
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumReferences.txt" Lines="@(ReferencePath)" Overwrite="true" Encoding="Unicode" />
<Exec command="dotnet &quot;D:\Signum\southwind\Framework\Signum.MSBuildTask\bin\x64\Debug\netcoreapp2.1\Signum.MSBuildTask.dll&quot; &quot;@(IntermediateAssembly)&quot; &quot;$(BaseIntermediateOutputPath)SignumReferences.txt&quot;" ConsoleToMSBuild="false">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>
</Project>
18 changes: 6 additions & 12 deletions Signum.React/Filters/SignumFilters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.WebUtilities;
using Signum.Entities.Basics;
using Signum.Utilities;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Threading.Tasks;

namespace Signum.React.Filters
{
Expand Down Expand Up @@ -160,7 +162,7 @@ public static string Action<T>(this UrlHelper helper, string action, object valu
}
}

public abstract class SignumDisposableResourceFilter : IResourceFilter
public abstract class SignumDisposableResourceFilter : IAsyncResourceFilter
{
public string ResourceKey;

Expand All @@ -171,18 +173,10 @@ public SignumDisposableResourceFilter(string key)

public abstract IDisposable? GetResource(ResourceExecutingContext context);

public void OnResourceExecuting(ResourceExecutingContext context)
{
context.HttpContext.Items[ResourceKey] = GetResource(context);
}

public void OnResourceExecuted(ResourceExecutedContext context)
public async Task OnResourceExecutionAsync(ResourceExecutingContext context, ResourceExecutionDelegate next)
{
if (context.HttpContext.Items.TryGetValue(ResourceKey, out object? result))
{
if (result != null)
((IDisposable)result).Dispose();
}
using (GetResource(context))
await next();
}
}
}
4 changes: 2 additions & 2 deletions Signum.React/Signum.React.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0-preview8.19405.7" />
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="3.5.3">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="3.6.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions Signum.Test/Signum.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

<ItemGroup>
<PackageReference Include="dotMorten.Microsoft.SqlServer.Types" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Signum.Analyzer" Version="2.4.5" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
Expand Down

2 comments on commit 48cdba0

@olmobrutall
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.Net Core 3.0 is here!

Last Monday .Net Core 3.0 was released with many improvements like WPF / WinForms support, better performance and C# 8.0 final version.

After this commit, the master branch works with .Net Core 3, and the latest version using .Net Core 2.2 will be in the core2 in case somebody needs it.

We have been using nullable reference types for a few months already, but with this release some core libraries are already annotated, so maybe there are some differences in the nullability checks. Apart

How to update

  • Update Framework and Extensions to the latest master
  • Change all the projects to TargetFramework
  • Remove dependency to Microsoft.AspNetCore.App in [YourApp].React.csproj
  • Update all nugets to the latest version
  • Carefully fix Startup.cs applying the changes between this two commits in southwind 427cefa8d6ebe477b655d2f5a49281640b7f3dd7 and eae0eea961f627fbf3973178d46bd2aa44135a61 manually:
    signumsoftware/southwind@427cefa...eae0eea

Note: There is not plan to bring the old Signum.Windows back to live for now. All the focus is in Signum.React that is also being updated to react-bootstrap, TS 3.6 and React 16.9 pushing functional components everywhere.

Enjoy!

@MehdyKarimpour
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 👍

Please sign in to comment.