Use assembly.Location instead of assembly.CodeBase

Bug #928246 reported by Svein Ackenhausen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
Fix Released
High
Charlie Poole

Bug Description

Some areas of NUnit uses assembly.CodeBase instead of assembly.Location. Because of that NUnit fails to resolve assemblies when the path contains #. This is because CodeBase is a Uri.

Changed in nunit-3.0:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 2.9.6
Revision history for this message
Charlie Poole (charlie.poole) wrote :

It will not be quite so easy as that. :-(

In some places, we have to use Assembly.Codebase, because Assembly.Location
can up being in the Shadow Copy Cache and we need the actual directory in
which the assembly originally located in order to navigate the directory
structure using relative paths.

In NUnit 2.x, we parsed the location ourselves to resolve the # issue and may
have to do the same in NUnit 3.0. However, the best approach would be to
try to eliminate the need for the actual directory in the code.

This is a good catch - I guess I forgot why we had all that code in 2.x
in the first place!

Charlie

Changed in nunit-3.0:
status: Triaged → Fix Committed
Changed in nunit-3.0:
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.