Warden migration to .NET Core

Big changes related to the Warden project – it has been totally rewritten to the new .NET Core in order to support cross-platform capabilities (at least in a future).
The functionality per se (including API) didn’t change, yet from now on you can use Warden with the new DNX runtime.
If you’re interested in the migration process, a current status of this update (including the supported parts of the project) and what are the next goals – take a look at the whole post.


Why did I decide to move the whole project to the new .NET Core platform in the first place? Mostly, because it was my initial idea to make that library a truly cross-platform. And it’s better to do such (bold) moves when the whole development is at some early (alpha) stage.

The great thing about this migration is that it’s compatible with the regular .NET framework, but on top of that it works well with the new platform and one day you will be able to run it also on Mac or Linux (when all of the external libraries will support DotNet 5.4).

Was the migration itselft difficult? Actually not, it was a pretty straightforward thing to do, yet I’ve had some issues mostly with the tests (eventually they’ve started working).
So this is how the story goes:

  1. Create a new solution.
  2. Add new projects of type Class Library (Package).

    New .NET Core project

    New Class Library project is hidden inside the Web section.

  3. Copy the files from your previous projects to the new ones.
  4. Take a deep breath – you no longer have to manually add the files to the solution (one of my favorite features, seriously).
  5. Make sure that namespaces match, add references to the other projects in the solution if it’s needed.
  6. Open the project.json file and update the packages in the dependencies section – beware of the frameworks that make use of packages.
  7. Everything should compile now and you’re good to go.

If you want to execute tests with NUnit, please take a look at this article, as currently, you have to create a new Console Application to make them run. You can also try XUnit which seems to have better support these days – here is how. I’ve also had issues with MSpec which resulted in removing this library and providing some “hacks” to make the current code work without rewriting all of the tests. Nevertheless, I’ve managed to get it done (somehow).

What is the current status in terms of cross-platform support for the Warden? You can find the latest updates here, so let me just make use of this sophisticated copy-paste pattern:

Warden cross-platform support

Current status of the Warden cross-platform support.

Currently, only Warden Core and Web Watcher support other platforms. The remaining plugins will not run on Linux or Mac yet – basically, I have to wait for the other external libraries updates.

And what are my future plans? Honestly, I’m thinking of pushing this project into some kind of web application (as a client side) but haven’t decided yet how it would work (and look like). I’ll keep working on the new watchers and integrations, however, I’d like to make it more user-friendly and enjoyable for the other folks who might use this tool. And who knows, maybe someday it will turn into something profitable.

Leave A Comment

Your email address will not be published. Required fields are marked *