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

Compability with .NET Core 3.0.0-preview-27122-01 #159

Closed
koster26 opened this issue Dec 14, 2018 · 7 comments
Closed

Compability with .NET Core 3.0.0-preview-27122-01 #159

koster26 opened this issue Dec 14, 2018 · 7 comments
Labels

Comments

@koster26
Copy link

When using DotNetify with .NET Core 2.2 SDK I haven't problem. However, I was forced target the project to .NET Core 3.0 SDK (I need support for the serial port on Linux) and got exception.

IDE: Visual Studio 2019 16.0.0 Preview 1.1
SDK: .NET Core 3.0 v3.0.0-preview-27122-01

exception

@dsuryd dsuryd added the wontfix label Dec 14, 2018
@dsuryd
Copy link
Owner

dsuryd commented Dec 14, 2018

It won't be good practice to keep up with unstable preview versions. This library will only target compatibility with the release version of .NET Core 3.0.

@dsuryd dsuryd closed this as completed Dec 14, 2018
@RobertTheGrey
Copy link

Any thoughts on when .NET Core 3 will be the default target now that it's released? We're keen to use some of the latest Signal-R capabilities. We can see the Blazor experimental branch already uses it, so is it close to being possible?

@dsuryd
Copy link
Owner

dsuryd commented Oct 30, 2019

You can use the current library version with .NET Core 3 simply by replacing :

app.UseSignalR(routes => routes.MapDotNetifyHub());

with

app.UseRouting();
app.UseEndpoints(endpoints =>
{
    endpoints.MapHub<DotNetifyHub>("/dotnetify");
});

Additionally, switch the SignalR JSON protocol back to using Newtonsoft.Json.

@RobertTheGrey
Copy link

Many thanks - we'll give that a shot

@fastrocket
Copy link

When I edit the HelloWorld.WebPack .csproj file to use netcoreapp3.0 in Visual Studio 2019:

netcoreapp3.0

I get this error:

Severity Code Description Project File Line Suppression State Error NETSDK1045 The current .NET SDK does not support targeting .NET Core 3.0. Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. HelloWorld.WebPack C:\Program Files\dotnet\sdk\2.1.500\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 137

Any chance you could update at least one demo to use .NET Core 3.0? Or know how to fix the above?

(I've successfully built netcoreapp3.0 apps on this machine before.)

@dsuryd
Copy link
Owner

dsuryd commented Nov 14, 2019

If you run that csproj from a clone of this repo, then there's a global.json at the project root that's restricting the SDK to v2.1.5. Either edit that to v3.0 SDK, or remove it entirely.

@fastrocket
Copy link

Thanks, that did it!

Here are the steps:

  • Edit HelloWorld.WebPack.csproj and change TargetFramework to netcoreapp3.0
  • and delete the line with the PackageReference to Microsoft.AspNetCore.App since .NET Core 3 doesn't need it
  • Change global.json as above (I deleted everything). Restart VS2019 or unload/load project.
  • Add Nuget package Microsoft.AspNetCore.SpaServices since .NET Core 3 separates various things into individual Nuget packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants