views:

102

answers:

1

NUnit 2.5.0

C# Class Library .NET 3.5

I have a strange error that just recently started to occur.

When trying to open a c# class library project in Nunit it immediately throws an exception:

System.NullReferenceException... at NUnit.Util.VSProject.LoadMSBuildProject(String projectDirectory, XmlDocument doc) at NUnit.Util.VSProject.LoadProject(String projectDirectory, XmlDocument doc) at NUnit.Util.VSProject.Load()

System.ArgumentException... at NUnit.Util.VSProject.ThrowInvalidFormat(String projectPath, Exception e) at NUnit.Util.VSProject.Load() at NUnit.Util.VSProject..ctor(String projectPath) at NUnit.Util.ProjectConverters.VisualStudioConverter.ConvertFrom(String path) at NUnit.Util.ProjectService.ConvertFrom(String path) at NUnit.Util.ProjectService.LoadProject(String path) at NUnit.Util.TestLoader.LoadProject(String filePath, String configName)

We can load the .dll directly and run the tests fine, but not sure why when trying to load the .csproj it causes this crash.

+1  A: 

Turns out the problem is with having too many "." in a project name.

Nunit barfs if you have

Name.Project.Something.SometingElse.csproj

it likes

Name.project.something.csproj

dmose