NUnit.Util.Transform.resources missing from nunit.util.dll

Bug #919876 reported by Ryan Boggs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
Low
Charlie Poole

Bug Description

I'm running into an issue that is preventing me from running tests with 2.6 beta4. The message that I am seeing is:

Test results could not be formatted.
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "NUnit.Util.Transform.resources" was correctly embedded or linked into assembly "nunit.util" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Looking at the nunit.util.build file, around line 87, it looks like the lines that include the resource file in question into the build have been commented out. Unless I am mistaken, uncommenting this information should fix this issue.

Thanks,
Ryan

Related branches

Revision history for this message
Charlie Poole (charlie.poole) wrote :

NUnit no longer uses an xslt transform to produce its console output as it
once did. So the error is a bit of a mystery.

What command line are you using with nunit-console in order to get this error?

Does it give you a stack trace?

Is it possible that you are mixing versions of NUnit?

Revision history for this message
Ryan Boggs (rmboggs) wrote :

Actually, I figured out that NAnt still relied on it. The error came from a method in the nunit2 task. See line 360 here:
https://github.com/nant/nant/blob/master/src/NAnt.NUnit/NUnit2/NUnit2Task.cs

If this is this case, go ahead and close out this bug. I posted something related to this in the NUnit discussion group asking how to proceed. If you can reply to that with direction, it would be greatly appreciated.

Thanks,
Ryan

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Ah! I had not noticed that you were the originator of the bug.

I haven't seen your post arrive yet, but I'll reply when I do. In a
pinch, we could
just leave the unused resource in NUnit 2.6 and uncomment those lines.

Otherwise, I'll keep this bug to remind me to remove all traces of the unused
resource file.

Revision history for this message
Ryan Boggs (rmboggs) wrote :

Ok,

I think that worse case, we could see if we can embed the resource ourselves if you have no need for it. That said, I would be interested in what you did to replace your reliance on the resource. If we can incorporate a similar method, I would rather go that route.

Thanks,
Ryan

Revision history for this message
Charlie Poole (charlie.poole) wrote :

I haven't seen your note on the NUnit list yet, so I'll answer here.

In the past, NUnit was using transforms to create console output, not reports - although you could redirect the console output to a file and call it a report if you liked. XSL transforms are a logical way to go for reports, but are overkill for console output.

In 2.6, we simply use Console.WriteLine to produce the console output. For reports, we suggest that folks post-process the xml result report.

In 3.0, there are command-line options to specify the transforms and actually create reports - separate from the console output.

Charlie

Changed in nunitv2:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Charlie Poole (charlie.poole)
Changed in nunitv2:
milestone: none → 2.6.0rc
Revision history for this message
Ryan Boggs (rmboggs) wrote :

Hi,

I see where you are going with this and it does make sense. That being said, I am kinda in a pickle. After further investigation, I realized that NAnt gives the user the opportunity to provide custom xslt files to format NUnit's output when the formatter for the nunit2 task is set to plain. The Summary.xslt resource was being used as a default if a custom xslt file was not provided. Updating NUnit referenced in NAnt from 2.2 to 2.5/2.6 is enough of a change, I don't want to take away functionality in the process.

So there are two options that I can see from this right now:
1) Keep the Transform.resx in nunit.util.dll that can be referenced
or
2) NAnt embeds the resource in question.

Since you are trying to move away from that resource, which I respect, #2 would probably be the way to go. The only question I would have is what kind of license issues would we run into incorporating an old NUnit licensed resource file into a gpl 2.0 licensed program.

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Since you are already distributing some NUnit assemblies with NAnt, no new license issues are introduced if you take the transform file and embed it yourself. I assume NAnt includes the NUnit license file somewhere.

OTOH, since NUnit 2.6 is really the end of the line, it would do no harm to keep the file embedded. NUnit 3.0, since it's an entirely new codebase, api and license, is the point where you would have to change.

I'm happy to go either way at this point.

Charlie

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Additional FYI...

The Visual Studio build of NUnit still embeds the file, so I want to change either it or the NAnt script to be consistent.

Charlie

Revision history for this message
Ryan Boggs (rmboggs) wrote :

It would be great if you kept the embed for 2.6 as it was (in nunit.util.dll) and completely remove it for 3.0. I think it would make sense to go that route but in the end, it's your call.

Another point, I'm thinking that once nunit 3.0 start up (ie: releases for this branch start coming out), we might look into an nunit3 task in nant. However, that may require additional thought once we reach that bridge.

Your time and insight in this is greatly appreciated. Thank you.

Ryan

Revision history for this message
Charlie Poole (charlie.poole) wrote :

OK, I'm restoring the embedded resource to the NAnt build for 2.6.

Regarding 3.0, I'll drop you a note offline.

Changed in nunitv2:
status: Triaged → Fix Committed
Revision history for this message
Ryan Boggs (rmboggs) wrote :

Much appreciated Charlie. Thanks for your time and effort.

Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.