1

Re: Get ViEmu working under experimental hive

I am developing an IronPython project. This requires me to launch Visual Studio's experimental hive mode that comes with the Visual Studio SDK. Does anyone know how to enable ViEmu under these conditions?

thanks,
Tomas

2

Re: Get ViEmu working under experimental hive

Hello Tomlu,

At least one other customer has been able to set up ViEmu with the experimental hive and with IronPython Studio (I understand they're not related?). I use ViEmu in the experimental hives of all VS versions with no problems, for debugging myself. There shouldn't be a problem in setting it up once you know how to do it.

What version of Visual Studio are you using? The "Experimental Hive" has changed places in VS 2008 (from an HKLM location to an HKCU location, in order to work with non-administrator accounts), and the instructions are different.

Here's what actually needs to be done: you need to add the registry entries that hook ViEmu into the Visual Studio registry hive used by the installation you are using. I'm going to post these entries here in text form, as they look like for integration in Visual Studio 2005. For other installs, it's enough to substitute the following location:

  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0

By whatever is needed, in all places where it appears. In a test install I did of IronPython Studio, the relevant key was:

  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppEnv\9.0\Apps\IronPythonStudio_0af06295-cb9e-41e6-9cae-e777c3912b3b

You only need to copy the contents below, save it in a text file with a ".REG" extension, do the adequate substitution and double click the .REG file.

Regards,

  -- Jon

------------------------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\AutoLoadPackages]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\AutoLoadPackages\{ADFC4E64-0397-11D1-9F4E-00A0C911004F}]
"{86EEBA48-56EC-43E8-AAA2-3A7A8DD83332}"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\AutoLoadPackages\{F1536EF8-92EC-443C-9ED7-FDADF150DA82}]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\InstalledProducts]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\InstalledProducts\ViEmu]
@="ViEmu"
"UseInterface"=dword:00000001
"Package"="{86EEBA48-56EC-43E8-AAA2-3A7A8DD83332}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{86EEBA48-56EC-43E8-AAA2-3A7A8DD83332}]
"InProcServer32"="C:\\Program Files\\ViEmu\\ViEmu.dll"
@="ViEmu"
"CompanyName"="NGEDIT Software"
"MinEdition"="standard"
"ProductVersion"="1.2"
"ProductName"="ViEmu"
"ID"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{86EEBA48-56EC-43E8-AAA2-3A7A8DD83332}\SatelliteDll]
"DllName"="ViEmuUI.dll"
"Path"="C:\\Program Files\\ViEmu\\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Services]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Services\{3582C17C-48A8-4EB7-978F-3975B395F0DC}]
"Name"="ViEmu Marker Service"
@="{86EEBA48-56EC-43E8-AAA2-3A7A8DD83332}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Text Editor]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Text Editor\External Markers]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Text Editor\External Markers\{0B461F6D-8F34-494A-A07A-2EC3D6118833}]
"Package"="{86EEBA48-56EC-43E8-AAA2-3A7A8DD83332}"
"DisplayName"="\"#201\""
"Service"="{3582C17C-48A8-4EB7-978F-3975B395F0DC}"
@="ViEmu hlsearch Marker"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Text Editor\External Markers\{759C9305-6031-46EF-B32D-BDCFAE8BF8B2}]
"DisplayName"="\"#202\""
"Service"="{3582C17C-48A8-4EB7-978F-3975B395F0DC}"
"Package"="{86EEBA48-56EC-43E8-AAA2-3A7A8DD83332}"
@="ViEmu Incremental Search Marker"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Text Editor\External Markers\{E3A0CE66-9EA5-43B5-B5A3-EC36F5A61255}]
"DisplayName"="\"#200\""
"Service"="{3582C17C-48A8-4EB7-978F-3975B395F0DC}"
"Package"="{86EEBA48-56EC-43E8-AAA2-3A7A8DD83332}"
@="ViEmu Selection Marker"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\ToolsOptionsPages]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\ToolsOptionsPages\ViEmu]
"Package"="{86EEBA48-56EC-43E8-AAA2-3A7A8DD83332}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\ToolsOptionsPages\ViEmu\General]
"Package"="{86EEBA48-56EC-43E8-AAA2-3A7A8DD83332}"
"Page"="{6A88B893-294C-47d8-A23B-E5A2405162A1}"

3

Re: Get ViEmu working under experimental hive

Thanks for the swift response.

By replacing the path with 8.0Exp instead of 8.0, I was able to get ViEmu to load. However, while the fat cursor indicates that ViEmu is up and running, all keypresses have their normal, non-ViEmu effect. I added the same registry information to the 8.0 (normal) hive, and it keeps on working as expected. Any more clues?

4

Re: Get ViEmu working under experimental hive

After looking into it some more, I have additional information.

It appears that I need to open a .cpp or .cs (and probably others) before ViEmu starts working. After I have opened one once, ViEmu kicks in on all .py files as well. Opening several .py files does not work unless I open a non-.py file as described above.

It is most peculiar. I can of course live with this even if it is a bit inconvenient to have to open a cpp file once per startup.

5

Re: Get ViEmu working under experimental hive

Tomas,

Do you have Visual Assist installed but non-functional for some reason? That would be the most likely cause.

ViEmu has to wait until VAX subclasses the editor window, before subclassing it itself. This is so that it will see keypresses before VAX and everything will work correctly (normal mode keystrokes shouldn't get to VAX, else it will start popping up nonsensical autocompletion drop downs). Also, there is no good way to detect whether VAX will or will not subclass a certain editor window after some time (it takes it time before subclassing, don't ask me why), so I resort to looking at the add-in list. If VAX is present in the list, but inactive (for example: an expired trial), then ViEmu will wait for ever, and you'll get the behavior you describe.

The "block cursor" in this mode is intentional, I do a double subclass ("the pinch"), to be able to operate before VAX does its thing, and I force the block cursor even before the real subclass for aesthetic purposes.

Regards,

  -- Jon

6

Re: Get ViEmu working under experimental hive

That is precisely the correct analysis. VAX is installed but was not loading correctly in the experimental hive. Disabling add-ons fixes my problem; next, I guess I'll try to get VAX to run as well even though it won't be useful for my Python project.

Thanks Jon!

7

Re: Get ViEmu working under experimental hive

You're welcome, I end up having too much familiarity with common 3rd-party-add-in-induced errors...

Regards,

  -- Jon

8

Re: Get ViEmu working under experimental hive

FIY, I was able to get it working using both VS2005 and IronPython Studio using the above method.

9

Re: Get ViEmu working under experimental hive

Great, glad to hear that! Thanks for posting your experience.

Regards,

  -- Jon