codereflection / Giles

a continuous testing tool for .NET applications

Home Page:http://testergiles.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failing without specifying configuration and platform on nunit command line? [LONG]

JeffHoover opened this issue · comments

Hi.
I just started with Giles and I'm struggling a little.

I made a toy solution in 2012 with a failing test and made sure the test ran. Then I ran Giles like this:

giles -s C:\Users\Jeff\Documents\giles_test\giles_test\giles_test.sln

and hit R and no matter what, I got something like:

Build complete in 1.1499568 seconds. Result: Failure
Test run completed in 1.0722951 seconds

So I built Giles and debugged it in 2012 and found that in the Run() method, it was executing:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe c:\users\jeff\giles\giles\giles.sln

so I ran that command in a command prompt and got:

...Project "c:\users\jeff\giles\giles\giles.sln" on node 1 (default targets).
c:\users\jeff\giles\giles\giles.sln.metaproj : error MSB4126: The specified solution configuration "Debug|BNB" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [c:\users\jeff\giles\giles\giles.sln]
Done Building Project "c:\users\jeff\giles\giles\giles.sln" (default targets) -

  • FAILED.

so I changed Run() as follows:

// var result = CommandProcessExecutor.Execute(settings.MsBuild, """ + config.SolutionPath + """);
var executeArguments = """ + config.SolutionPath + """ + " /p:Configuration=Debug /p:Platform="Any CPU"";
var result = CommandProcessExecutor.Execute(settings.MsBuild, executeArguments);

Then I built and ran it and, sure enough, I got:

======= NUNIT TEST RUNNER RESULTS =======
Passed: 0, Failed: 1, Ignored: 0

which is what I expected for my toy solution.

What am I doing wrong?

Thanks,
Jeff

It's been a while since I've seen this issue, so I'll have to try and reproduce it again.

Can you tell me if the framework was set to client profile?

It was .Net Framework 4 without Client
Just now I tried .Net Framework 4.5 (which doesn't have a Client choice)
and had the same problem.
And I tried .Net Framework 4 Client Profile and still had the same problem.

Oh and I checked, I am running 0.1.0.5

On Thu, Sep 12, 2013 at 12:57 PM, Jeff Schumacher
notifications@github.comwrote:

It's been a while since I've seen this issue, so I'll have to try and
reproduce it again.

Can you tell me if the framework was set to client profile?


Reply to this email directly or view it on GitHubhttps://github.com//issues/41#issuecomment-24337437
.