What I Learned After A Week of Visual Studio Code and ASP.NET 5
/ 3 min read
Found this post helpful?
Buy me a coffeeTable of Contents
The past week of development started with a simple question: “What would it be like to build an ASP.NET 5 application without Visual Studio 2015?” Bill Boga, Kevin Hougasian, and I set out to create a simple web application that worked cross-platform across Bill’s Windows environment and Kevin and I’s Mac OS X environments. The culmination of our work can be found at http://github.com/ritterim/releases. I learned a few things during that time that I’d like to share in this post.
Visual Studio Code Is Great
Visual Studio Code is an excellent option for developing ASP.NET 5 applications. Powered by OmniSharp, it gives you all the essential features necessary to move through your application. The only downside being that there currently is no Razor support, but I’m hoping that gets fixed soon.
I Miss The Debugger
I miss the debugger in Visual Studio 2015. Stepping through an application’s code and seeing runtime values cannot be undervalued. Without the debugger, we were left scattering Console.WriteLine statements and ILogger instances throughout our code, most of which are gone now.
ASPNET_ENV=Development
We used a convention to load environment specific configurations so as to not check-in sensitive configuration information into the main repository. Our development configuration is appSettings.Development.json. To use that we need to ensure that our ASPNET_ENV setting is Development.
$ dnx web aspnet_env=DevelopmentASP.NET 5 is ready (mostly)
If you read my blog regularly, you may have seen that we found a less than ideal behavior with TagHelpers. Other than that hiccup, ASP.NET 5 is smooth. To be clear, we were still using the Full CLR and Mono.
Sometimes, you have to write it yourself
We started trying to use OctoKit.NET as our GitHub access mechanism. We quickly realized that the API wrapper is missing features we desperately needed. We ended up ditching the dependency and implementing only the HTTP calls we needed.
Broken DNX-Watch on Mac OS X
I had to stop and start the dnx process with every new change I implemented. While across from me, Bill Boga was able to get the experience I imagine the ASP.NET team wants everyone to have.
Dependency Injection
The dependency injection in ASP.NET 5 is pretty decent, especially for something right out of the box. We didn’t use it in the same capacity as some of our more complex applications, but I don’t see why not.
Deploying and Hosting
Setting up IIS and the HttpPlatformHandler is a little confusing. The installer process could use some improvement. Also, when the HttpPlatformHandler fails there aren’t a lot of signs pointing to the real problem, at least that I know of right now.
Conclusion
We found that building an ASP.NET 5 wasn’t only possible as a cross-platform team, it was fun! I can see how this is the future and how teams will want to focus on shipping features, rather than arguing about environments. As Han Solo would say, “Yahoo!”