mohanak12 / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 1 forks source link

Link to Visual Studio opens file in incorrect solution #631

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open solution/project A in instance A' of visual studio and Gallio
Icarus, compile and run some tests
2. Open solution/project B in instance B' of visual studio and Gallio
Icarus, compile and run some tests, one of which fails.
3. Click on hyper link within Execution Log of B'

What is the expected output? What do you see instead?
Icarus should open a code window within instance B' of visual studio
Icarus actually opens a code window within instance A' of visual studio

What version of the product are you using? On what operating system?
3.1 build 397 on Windows 7 x64

Please provide any additional information below.

Original issue reported on code.google.com by bender.oh@googlemail.com on 5 Mar 2010 at 6:46

GoogleCodeExporter commented 9 years ago
This is a known limitation of the current API.  We only try to open files in the
first instance of Visual Studio that we find.

We can improve this to search all current Visual Studio instances for a 
solution that
contains a good match for the file.  The tricky part here is that we only know 
the
name of the file to open, we don't know which solution it belongs to.  
Consequently,
Gallio tries to find a project in Visual Studio that contains the file and 
opens it
there if it can.

This code is in the Navigator project under GallioNavigatorEngine.cs.

Here's what really should be done:

1. We should introduce a new kind of service for describing IDEs.  The service 
would
provide functions for opening files, launching in debug mode, and maybe doing 
other
useful things.

2. Then we can implement a VisualStudioIDE component with the logic currently in
Gallio.Navigator/GallioNaviatorEngine.cs and make it smarter.

3. An IDE manager service could take care of trying to automatically find 
registered
IDEs and doing the right thing based on the current content.  For example, if 
we're
running inside Visual Studio (say, in the ReSharper extension) then we should 
really
prefer opening links in that instance if there's some way to figure out which 
one it
really is.  If VisualStudio isn't there, or maybe if the user configures Gallio 
in a
particular way, then we should perhaps use Notepad or something else.

3. The current IDebugger service should probably be tied into IDEs in some way 
but it
might make sense to keep it at least partially independent.  There are some 
unsolved
problems here such as how to be smart about starting a debugger for Ruby 
projects, etc.

Caveats:

This generalization will make Gallio.Navigator.exe slower since it will have to 
load
plugins.  That shouldn't be too much of a problem because they get cached, but 
there
is already a tricky little bit of work going on in the navigator extension to 
achieve
process elevation when UAC gets in the way of stuff.  It's not clear to me what 
might
happen if Navigator actually needed to initialize the full Gallio runtime.

Original comment by jeff.br...@gmail.com on 5 Mar 2010 at 8:36

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 17 Jul 2010 at 8:10

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 14 Jun 2011 at 5:53