Issue 284 - NUnitLite Unification

This is the  final PR for the umbrella issue we have been calling NUnitLite Unification and fixes #284 

These commits clean up a lot of small things...

  * All source files are now added to every framework build, wrapped by conditions as needed
  * There is no longer a distinction between the nunit and nunitlite frameworks. Only nunit.framework remains.
  * NUNITLITE conditional is now only used to indicate the nunitlite.runner build
  * Where necessary platform conditions (NETCF, SILVERLIGHT, PORTABLE) are used to exclude code
  * Some unused code has been removed

A note on the first point... In the past, we have excluded code from certain builds in two different ways. Sometimes we used a condition. Sometimes we just left the file out of the project. ...And sometimes we did both. This makes it hard to find all the conditions. It's easy to search for #if NETCF but harder to locate all the files not included in the CF build. If we control inclusion of code exclusively by conditions, then it's easier to find all the instances where the code differs by platform.

There are probably still some platform differences we could relax. That can come during later alphas or in the beta phase.

It's definitely true that we could reduce the usage of conditions by centralizing things. That will also have to be at a later point in time.
I do have another motive for this, in addition to the fact that it is a better practice.  In the Crestron S# framework, many of the System namespaces are replaced by Crestron namespaces.  It is a lot easier to condition the usings, then all of the fully qualified names.

 

I think just leaving the using in all builds is the best solution here.

 

From: Rob Prouse [mailto:notifications@github.com] 
Sent: Monday, November 24, 2014 6:29 AM
To: nunit/nunit
Cc: oznetmaster
Subject: Re: [nunit] Issue 284 - NUnitLite Unification (#383)

 

In src/NUnitFramework/framework/Constraints/MsgUtils.cs:

> @@ -92,7 +89,7 @@ public static string FormatValue(object val)
>                  return string.Format(Fmt_ValueType, val);
>  
>  #if NETCF
> -            var vi = val as MethodInfo;
> +            var vi = val as System.Reflection.MethodInfo;

I would normally agree with you @oznetmaster <https://github.com/oznetmaster> , but in this case I would prefer seeing it fully qualified here over an extra #if NETCF at the top. We could compromise and have a using System.Reflection; at the top without the #if and accept that it is unused in everything except the CF build. It wouldn't be the first unused using in our code   <https://assets-cdn.github.com/images/icons/emoji/unicode/1f604.png> 

—
Reply to this email directly or view it on GitHub <https://github.com/nunit/nunit/pull/383/files#r20768566> .  <https://github.com/notifications/beacon/AFh64QhPP0ZLZqdkbwMOx5IwuTEQoC8uks5nQlcPgaJpZM4C_pA6.gif>