Issue 261 - NUnit Portable

**Do not merge**, I am creating the pull request so we can start discussing if a Portable NUnitLite makes sense. Personally, I think it is the only maintainable approach to supporting other platforms like iOS, Android, Windows Phone, etc.

Portable libraries have limited thread, filesystem, serialization and appdomain support and reflection is also limited, although not as badly. Because of this, NUnitLite Portable has the Silverlight features minus the following;

- PlatformAttribute
- Attribute and AttributeExists constraints
- TimeoutAttribute
- TheoryAttribute
- DatapointProvider
- DelayedConstraint
- Various threading attributes (MTA, STA)
- Various Path constraints
- All tests run on the main thread

By definition, portable code cannot contain any runner code. The runner code needs to be in a platform specific assembly. To demonstrate how this works, I created an nunitlite.runner-sl-5.0 project and converted the Silverlight tests to use the portable library and the SilverLight framework.

We may be able to get several of the deleted features working by reworking the reflection code and moving some code across the portable/runner boundary. WorkItem is one example.

We would then need to provide runners for each of the platforms we want NUnitLite to support, although we might want to leave some platforms up to others. For example, Xamarin already has decent NUnitLite 2.0 runners for iOS and Android.

This PR brings up the question, "What is our vision of NUnitLite?" The desktop version is nearly feature compatible with the full framework. The CF version is adding features and becoming closer to the desktop version. Meanwhile, on phone platforms, we will be supporting a much smaller subset of features.

I wonder if we should drop the NUnitlite moniker and just call it NUnit? We could do the following;

- On Windows, we will provide the full framework and a runner assembly that you can link into your tests to make them a self executing test EXE if you want the nunitlite experience.
- CF will be similar, a full featured framework and a CF runner.
- Silverlight and mobile platforms will use the portable nunit.framework and platform specific runners.

If anyone wants to check out the code, there is a new `Portable` folder and most of the changes are to the Silverlight project since it is very similar in nature to the mobile platforms we will want to target.
Ok... So that would be DatapointAttribute rather than the theory code
itself. I agree we can deal with it later.
On Oct 27, 2014 9:36 AM, "Rob Prouse" <notifications@github.com> wrote:

> In src/NUnitFramework/framework/Attributes/TheoryAttribute.cs:
>
> > @@ -20,7 +20,7 @@
> >  // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> >  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> >  // ***********************************************************************
> > -
> > +#if !PORTABLE
>
> This is just another quick fix. There is no MemberType property on
> MemberInfo so the code needs to be rewritten to cast to the various types
> and check for null. I did it in a few places where I had to, so it is
> doable.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nunit/nunit/pull/313/files#r19417193>.
>