Giter Site home page Giter Site logo

Comments (12)

jezzsantos avatar jezzsantos commented on June 9, 2024

Will have a look at this next

from servicestack.webhooks.

jezzsantos avatar jezzsantos commented on June 9, 2024

Hi @KevinHoward,

Only been able to have a cursory look at this recently.
I am not really fully up to speed on how we proceed on your request at this time yet, perhaps you can help me plan that?

  • I understand that Standard 2.0 was released day before your request, which superceeds Standard 1.6.
  • I understand ServiceStack 4.5.10 (latest) supports standard 2.0 already. Although, not 100% sure of how to confirm that. Is that also your understanding?
  • I ran the MS portability tool to check compatibility for this codebase against Standard 1.6 and 2.0, and found we are not 100% compatible with Standard 1.6, but we are 100% compatible with Standard 2.0. (The difference being mostly the System.Reflection stuff we have).
  • I have attempted to migrate all projects in ServiceStack.Webhooks to .Net Framework 4.6.2 successfully. Have not pushed that change yet. (I feel it should/would create a 2.0.0 version of this library.)

If those things are the case, the move to a Standard 2.0 compatible version should be pretty straightforward, but very tedious, is that correct?

@KevinHoward, what do you think the simple steps to take would be, to get from where we are to where you want us to be? I am not seeing any tools or great guidance for how to do this apart from recreating all the projects from scratch again?

from servicestack.webhooks.

KevinHoward avatar KevinHoward commented on June 9, 2024

Hi @jezzsantos,

I haven't done much research into the matter with respects to your great library, but your assessment concerning .NET Standard 1.6 vs. 2.0 appears correct. It's my understanding that MS has spent a tremendous amount of time implementing a lot of the missing APIs into 2.0 so that more existing projects will port to the new standard. Along with this, the current version of Visual Studio 2017 15.3, which is currently in preview, now supports multi-targeting. This basically means that developers can now migrate their existing project files to the new .csproj format that the .NET Core/Standard use and still build their solutions to target the full .NET Framework. It seems that @mythz and @xplicit picked up on all of this early.

I believe the very first thing you would have to do is to install a copy of Visual Studio 2017 Preview. Luckily, you can install this without messing up your other VS installs. Next, you have to migrate the project files to the new format. One nice thing about the new format is that you no longer have to explicitly specify every file in the project, they just have to be in the project folder for Visual Studio (and the runtime for that matter) to include them in the build - it's now an opt-out making the csproj files much smaller. The difficulty here is to reference the proper libraries for each of the targets. Since ServiceStack has a full framework set of libraries and a .NET Standard set under the Core suffix, you will have to reference them accordingly - according to @mythz, this will eventually change once MS stops changing everything.

With the multi-targeting, you can continue to target both the full 4.5 and .NET Standard 2.0 for backwards compatibility, then by using directives add supporting logic so the compiler knows how to handle incompatibilities. However, and this is probably why you probably began upgrading to 4.6.2, if you want it to be able to compile for other platforms besides Windows, the minimum full framework is 4.6.1 (link). Here is a link to a great article on all of the above with screenshots and examples.

from servicestack.webhooks.

jezzsantos avatar jezzsantos commented on June 9, 2024

Thanks for the info Kevin,

OK, this will be my first core port, so lots to learn.
It seems I will need to rebuild each project file to get this done.
I got 19 projects to do, so it will be a little while.

So, I'll target Standard 2.0 alone and see where that gets us.
I'll upgrade to latest ServiceStack as well 4.5.13. Is there any other version of SS you think I should bind to?

cheers

from servicestack.webhooks.

mythz avatar mythz commented on June 9, 2024

I would skip VS.NET 2017 Preview, use the latest VS.NET 2017 and the .NET Core 2.0 that was just released as they work better together.

After we get this next version out (in hopefully a week), we'll begin working on v5 which will merge the .NET Core + .NET 4.5 packages so you only have 1 NuGet pkg to reference which supports both, we also intend to upgrade everything to .NET Standard 2.0, so I'd recommend waiting until we have v5 pre-release packages on MyGet out to save you time from trying to bind to a moving target.

from servicestack.webhooks.

jezzsantos avatar jezzsantos commented on June 9, 2024

Ah OK, thanks @mythz I will wait for v5.

I have some time now for getting some experience at this and learning, is there any merit in taking a first step in the meantime, like building the projects for Standard 2.0?

from servicestack.webhooks.

mythz avatar mythz commented on June 9, 2024

Yeah sure aim for .NET Standard 2.0, the compatibility is quite good now so porting should be relatively easy.

from servicestack.webhooks.

jezzsantos avatar jezzsantos commented on June 9, 2024

OK, gradually learning what I can porting to Standard 2.0 with ServiceStack 3.5.13 (which is .NET 2.6.1), and waiting for ServiceStack v5 before pushing a new version which should then be targeted just at Standard 2.0.

from servicestack.webhooks.

ryanhelms avatar ryanhelms commented on June 9, 2024

Hey Jeff, any movement on this? I'd really like to use this plugin in one of our latest project. We are targeting .net core 2.1. If not, I will look at what it will take to port it.

Thanks for the great plugin.

from servicestack.webhooks.

jezzsantos avatar jezzsantos commented on June 9, 2024

Hey @ryanhelms,

Sorry, for delay.
I've not been able to make progress on the standard migration version.

Honestly, I lack experience on migrating to .NET standard 2.0, enough to do this efficiently right now. (I don't know what I don't know at this point)
I'd be very happy to help you execute it though and learn from you on it.

from servicestack.webhooks.

jezzsantos avatar jezzsantos commented on June 9, 2024

I did recently upgrade the project onto ServiceStack 5.4.0 and .NET 4.6.2. Which is a target we use on other projects. I am not sure what is the next step?

from servicestack.webhooks.

mythz avatar mythz commented on June 9, 2024

To create .NET Standard builds you should migrate to the new/simpler msbuild format, then specify which target frameworks you want to build your project for, e.g:

<PropertyGroup>
    <TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
</PropertyGroup>

Then building your project will show all compile errors from each target framework.

You can refer to all ServiceStack .csproj projects which support .NET Standard/.NET Core which are built this way, e.g. ServiceStack.Interfaces.csproj is a simple example.

Then to deploy to NuGet you can copy the binaries into framework specific folders.

from servicestack.webhooks.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.