nunit/nunit-framework — pull request #149 by rprouse (2014-06-19 16:40:31+00:00)
Title: Convert Solution to use Universal Projects

This converts all of our Framework projects to use the new Universal Projects. This means that all of the platform specific projects no longer have source files, they pull in the source from the Universal Projects. Under the covers, all that Universal Projects are is a way to import source files into multiple projects.

I am putting this up as a pull-request so that people can play with it if they want. I want to discuss if we should go with this approach and get consensus, but I am happy to drop the branch if people don't like the idea.

Looking at the diffs won't do much, the branch should be viewed in Visual Studio, but I will add some screenshots to give you an overview.

### Advantages ###

- When you add a new class, you only have to add it to one project, not to every platform project.
- Features will not be mistakenly left out of a platform because developers forgot to add a file to a project. I found a few cases of this as I was working on this branch.
- If you go to definition to a source file that is open in another project, it will work now.
- If you want to see the effect of #if statements in different projects, you just need to change the project dropdown in the editor, not close the file and open it from a different project.
- As developers, we will now only need to work in a much smaller subset of projects.
- The Universal Projects are just MSBuild import statements, so it builds in MSBuild without change and the resulting binaries are no different.

### Disadvantages ###

- Requires Visual Studio Update 2
- If developers want to add new Universal Projects, it requires some hand editing of the project files. I have everything setup though, so this shouldn't be required.

### The Result ###

Now, when we are developing, we can ignore all of the platform specific folders and projects and just work in the Universal projects.

![Universal Projects](http://i.imgur.com/Sn3HO3I.png)

The platform specific projects now have no code in them, just a reference to the universal projects. There are a couple of projects with some platform specific code, but that is rare (mainly Silverlight nunitlite runner code).

![Platform Specific Project](http://i.imgur.com/dDpRDmd.png)

All work is done in the universal projects which look just like the platform specific projects used to.

![Universal NUnit Framework](http://i.imgur.com/fRmMIJW.png)

To switch which platform you are looking at, you select it from the dropdown at the top-left of the editor window.

![Project Dropdown](http://i.imgur.com/UrzqIDo.png)

When working on NUnitLite, all framework related code is in the nunit.framework universal project. The nunitlite universal project only contains the nunitlite specific runner code. The platform specific nunitlite projects import both the nunit.framework and nunitlite universal projects.

![NUnitLite](http://i.imgur.com/PbMFZML.png)

Personally, I think this makes it much easier to work with and maintain the solution and prevents mistakes like forgetting to add new files to projects.

If everyone else agrees, I will merge.