Upgrading 5.1.2 and exited with code 1 with .net 4.0

I got error after upgrading 5.1.2.

"c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" C:\BuildAgent\temp\buildTmp\tmp22DD.tmp exited with code 1"

Please view settings in attachment.



Attachment(s):
5-27-2010 4-49-27 PM.png
13 comments
Comment actions Permalink

Hello Kevin,

Please select .Net Framework 4.0 in .Net Coverage settings.

Kind regards,
Marina

0
Comment actions Permalink

I changed the Platform as .NET Framework 4.0 and got the same error.

I think :

If the Platform as .NET Framework 4.0,the Command Args should be:
Command Args: "x86" "v4.0" "c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe"

And if the Platform as .NET Framework 2.0,the Command Args should be:
Command Args: "x86" "v2.0" "c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe"

Is right?

0
Comment actions Permalink

I changed the Platform as .NET Framework 4.0 and got the same error.

Could you please check that .Net Framework is the same for .Net Coverage and NUnit Runner?

I think :
f the Platform as .NET Framework 4.0,the Command Args should be:
Command Args: "x86" "v4.0" "c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe"

And if the Platform as .NET Framework 2.0,the Command Args should be:
Command Args: "x86" "v2.0" "c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe"

Is right?


Yes, you are right. I filed this as http://youtrack.jetbrains.net/issue/TW-12320 Sorry for the inconvenience.

Kind regards,
Marina

0
Comment actions Permalink

Thanks.
But how can I fix this build error?

0
Comment actions Permalink

Kevin,

Please, provide a bit more details about configuration. What .NET, NUnit versions were used? What NCover version do you use? Could you please check that .Net Framework is the same for .Net Coverage and NUnit Runner?
Could you please attach  screenshot of build runner settings.

Thanks,
Marina

0
Comment actions Permalink

We install Winodws SDKs 7.1 on the build agent (Windows Server 2008 R2)

And the project is upgrade to VS 2010.

Attachment is the screenshot of build runner settings.



Attachment(s):
5-28-2010 7-47-09 AM.png
0
Comment actions Permalink

You selected MSBuild/Solution runner to use MSBuild 4 with ToolsVersion 3.5. That would mean you will create .NET 3.5 assemblies.
You selected .NET 4 for NCover exe. This option will only work if NCover supports .NET 4.0 (so you will need to have properly patched NCover build)

In your case I would recommend you to set NCover running under .NET 2.0. All other settings are OK. Will it work with that settings?
Thanks!

0
Comment actions Permalink

I've noticed, that you did not enabled NUnit tests in the configuration settings.
How do you start NUnit tests? Attach a part of your MSBuild script that starts NUnit.
Please change 'v4.0' to 'v2.0' in *NUnitLauncher.exe parameters.

Thanks!

0
Comment actions Permalink

Yes, I attached the nunit test in the msbuild scripts.

<Exec Command="regsvr32 &quot;$(NCoverPath)\coverlib.dll&quot; /s" Condition="'$(NCoverPath)'!=''" IgnoreExitCode="true" />
<NUnitTeamCity Platform="x86" NUnitVersion="NUnit-2.5.2" Assemblies="$(SourceCodeRoot)\Test\UnitTests\bin\MyProject.Test.dll"  />

I have changed   'v4.0' to 'v2.0' in  *NUnitLauncher.exe.
But build log is :

[18:41:10]: Command: c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.v4.0.x86.exe
[18:41:10]: Command Args: "x86" "v4.0" "c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe" "@@" "C:\BuildAgent\temp\buildTmp\tmp5FDF.tmp"

I have upgraded my .net 3.5 project to work with VS 2010, but the target framework is .net 3.5.
Are there any setting missing?
0
Comment actions Permalink

<NUnitTeamCity> task select .NET framework version based on MSBuildVersion.
Please specify 'Runtime' attribute with value 'v2.0'.

See http://confluence.jetbrains.net/display/TCD5/NUnit+for+MSBuild for more details.

0
Comment actions Permalink

Thanks.
<NUnitTeamCity Platform="x86" Runtime="v2.0" NUnitVersion="NUnit-2.5.2" Assemblies="$(SourceCodeRoot)\UnitTest\bin\Debug\MyProject.Test.dll" />

But I get a new error:
error MSB4064: The "Runtime" parameter is not supported by the "NUnitTeamCity" task. Verify the parameter exists on the task, and it is a settable public instance property.

Then I comment out <NUnitTeamCity in my build script and open unit test in build configuration, the build works!!!

So is it a bug of NUnitTeamCity task in build script?

0
Comment actions Permalink

TeamCityNUnit task select .NET version to run unit tests from current .NET version that is used to run MSBuild.
Please use 'RuntimeVersion' attribute instead of Runtime to make NUnitTeamCity task swotch to .NET 2.0
I'll fix documentation to refrect the right attribute name.

It's recommended to use NUnit configured from TeamCity ui.

0
Comment actions Permalink

The RuntimeVersion works!!
Yes, I think the NUnit configure is better.
Thanks!

0

Please sign in to leave a comment.