26 Sep 2018
.NET Core and Forge
.NET Core is a free and open-source managed computer software framework for the Microsoft Windows, Apple macOS and Linux operating systems. It's being around us for a while, and with the recent version 2 and broader support, it's getting better and better.
A few points I enjoy:
- Cross-platform: works from MacOS (which I've been using), but also Linus and Windows, of course
- Visual Code IDE: one of the most used free tools, and we use extensively
- Deploy to Heroku: this is a huge time saver for auto-deployment from Github, which I personally use all the time
- Server-less: that's the next big thing, and AWS Lambda supports .NET Core 2+
Interested?
Start using it today! No need to wait, the Autodesk.Forge package is .NET Standard/Core compatible and works just fine. There are just a few tips & tricks:
- Most of our samples use port 3000, so adjust your project ASPNETCORE_URLS env var to http://localhost:3000
- Heroku needs a build-pack to work with .NET Core, I'm using this
- If you're on a MacOS, you may need this workaround to avoid 100% CPU usage
Check this complete step-by-step
Sample
Want a sample? Sure, check this github repo! It is based on the Learn Forge tutorial code for 3-legged. As you'll see, the UI is exactly the same as in the tutorial, the difference is on the server side. This other sample is also in .NET Core and hosted on Heroku (with auto-deploy from Github)