Saturday, August 22, 2015

Visual Studio 2015: Error Adding "Shared Project" to Solution

This entry presents an error I encountered and how I solved it.

My standard development Virtual Machine (as of August 2015) is Windows 10 Enterprise and Visual Studio 2015 Professional. As part of a desktop project (a solution containing a WPF project), I attempted to add a project of type "Shared Project" and received the following error dialog:

The text of the error is as follows:
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.1\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\Microsoft.Windows.UI.Xaml.CSharp.targets

Notie the 8.1 in the previous path meaning Visual Studio 2015 is categorizing the Shared Project as Windows 8.1.

I found a article that pointed to the following as a way to solve the problem and it looked promising: Why can't I create Shared Project in Visual Studio 2015? and the answer that caught my attention is as follows:

To clarify what Mr. Kondrasovas is recommending, look at the following example found under the New Project dialog (from Visual Studio, File | New | Project) under Templates | Visual C# | Windows | Windows 8:

In a perfect world where developers "grow apple trees and honey bees and snow-white turtle doves" this would have solved the problem by on my machine the following error was displayed:

Then I thought back to the Visual Studio 2015 install process. I had selected the default instalation. There must be a set of Windows 8.1 categorized objects that did not install.

I was coding a desktop application that could run on Windows 8.1 or Windows 10. There was nothing that tied my project to only run on Windows 8.1. So Microsoft's categorization is odd.

So under Control Panel | Programs | Uninstall a program, I selected Visual Studio 2015. Most savvy Windows users realize to add features to a previously installed program to select "Uninstall a program" in order to display the "Uninstall or change a program" dialog as follows:

Clicking on "Microsoft Visual Studio Professional" display the following dialog:

To add the missing project templates, select "Modify" which displays:

Rather than guess at what items to check to remedy the situation, I clicked on "Select All":

Since the whole nine yards was selected, I clicked on Next:

After this I was able to create and add a Shared Project to a solution.

Revisiting the "New Project" dialog (from Visual Studio, File | New | Project) under Templates | Visual C# | Windows | Windows 8 the following is now displayed (not the missing templates have been installed):

The irony is that Shared Project template is not event listed as a Windows 8 template. The Shared Project template is founder under Templates | Visual C# | Windows:

Tuesday, August 11, 2015

VSOL: Visual Studio Online versus GitHub

Visual Studio Online ( and GitHub ( both support Git repositories. For those not familiar with Git, it is a distributed version control system (see: Git (software). So the question is, which is better, Microsoft's Visual Studio Online (VSOL) or the open source community's darling, GitHub? Although both provide access to Git-based revision control the model is different -- it is like comparing apples to oranges.

If your primary goal is to share a project with the hoi polloi (such as an open source project) then GitHub makes sense. The free personal plans get unlimited collaborators and unlimited public repositories while the free organizational plans get unlimited members and unlimited public repositories. The downside to the free plans offered by GitHub (whether individual or organizational) is that private repositories are not supported. Individuals and organizations are required to spend money in order make their repositories private.

Visual Studio Online (VSOL) supports unlimited Git repositories for up to five developers at no cost (Signing up for Visual Studio Online (cloud-based Team Foundation Server)). VSOL does not have a public option such as that supported by GitHub and hence there is no way to share a Visual Studio Online project with the common people (see Pulp's "Common People", a great music video). Recall also that in addition to five free source code licenses, Visual Studio Online offers unlimited licenses to stake holders (Visual Studio Online (cloud hosted TFS): Unlimited (no cost) users can Create/Access Bugs/Tasks) which allows product managers, Q.A. engineers and tech support to take advantage of the bug tracking and project management 
This blog has previously presented the cost structure of Visual Studio Online (The cost of Visual Studio Online (cloud based TFS) and 10 Visual Studio Premium Licences for a great price). The previous post is from November 14, 2013 so it is highly likely the prices have changed. It is important to note that Visual Studio places no size restrictions on projects and does not limit the number of projects that can be created. All-in-all the prices associated with Visual Studio Online were reasonable.

GitHub pricing can be found at Plans and pricing. An individual can purchase five private repositories for $7 a month (Micro plan). An organization can purchase ten private repositories for $25 a month with unlimited members and unlimited public repositories (Bronze Plan). 

With regard to the size limitations of GitHub see "What is my disk quota?"  which is shown below:

A 1GB limit is reasonable for most software projects so the previous screenshot is not meant as a criticism but is simply information for those evaluating Visual Studio Online versus

To put the two in their proper perspective consider World Vision a charity that allows people to sponsor a child for $35 a month, a child that might otherwise go hungry. For every five GitHub personal plans subscribers who select the Micro Plan ($7 a month), a child goes hungry (5 * $7 = $35). Okay, that was joke.

GitHub and Visual Studio Online are both reasonable options and are reasonably priced. My choice is Microsoft because I have access to licenses as a Gold Partner and through Microsoft's Biz Spark program. I also have confidence in Microsoft's ability to manage cloud based applications including backup. This does not mean GitHub does not do a stellar job of protecting data. Microsoft is one of the main cloud players which is an incredibly high bar.