With the recent announcement that .NET Core 1.0.0 is officially released, Microsoft also announced that Preview 2 for .NET Core 1.0.0 is available. However to install it you must first uninstall Preview 1 if you have it installed. The issue is that to uninstall you have to have the original setup program. If you go to any current links they will take you to the Preview 2 installer so you are in a catch-22. Fortunately Barry Dorrans tweeted a link to the Preview 1 installer here. So if you need to uninstall Preview 1 first then use that link to get the installer. I also recommend that you keep the Preview 2 installer around for the inevitable uninstall later.
T4 Templates Update for Visual Studio 2015
A while back I posted a series of articles on how to use T4 and a custom VS extension to simplify some common code like application settings, WCF clients and environmental transforms. With the release of Visual Studio 2015 I had to update my own extension and templates so I wanted to posted a follow up article on the changes that need to be made to allow the extension to work with Visual Studio 2015. As part of the update I added some functionality to the app settings template. Before continuing be sure to download the previous version of the series (or simply download the final version below).
Visual Studio 2015 RC NuGet Package Bug
UPDATE: NuGet Package Manager 3.1 has been released to Visual Studio Gallery. It resolves the issue mentioned here.
For those of you using the Visual Studio 2015 RC/RTM release you should be aware of a bug in the version of NuGet that ships with it. The bug manifests itself when building or debugging a project. When you first start VS the package is fine and you can go to ToolsOptionsNuGet Package Manager and adjust settings. Clearly the package has been successfully loaded. But when you start to build the project (or start to debug which triggers a build check) then VS may report that the package failed to load.
The problem is that NuGet is attempting to update the nuget.config file to a new version and the file is read only causing the package to fail. The file can be read only for a number of reasons but the most likely case is when you are using source control (like TFS) and the file is checked in. The bug has been reported to NuGet and appears to be resolved in future versions. For now the workaround, if you encounter this issue, is to simply modify the nuget.config file to not be read only (or check the file out of source control) so that the update can succeed.
C# v6 Features–Nameof Operator
One of the cool new features coming in C# v6 is the nameof operator. This handy little operator solves a common code smell, string literals for programmatic items. Let’s take a simple example.
Visual Studio 2015 Preview–Package Manager
One of the changes coming with VS 2015 is how NuGet packages are managed. In VS2013 you got something like this when managing packages for a solution.