Visual Studio 2008 Add-In Failure, Nov 2008

Nov 22, 2008 at 4:08 AM

Hi, 

There seems to be a bug that prevents the Add-In from working on Visual Studio 2008.  Several other people have confirmed that the Add-In will not start in Visual Studio 2008, using the current release.  (See the open issue that I filed a couple weeks back,  and also, http://thepursuitofalife.com/2008/09/19/the-missing-f-visual-studio-add-in/)

The error is:  "Error loading the Code Window context menu item"

I looked into the latest code:

In VsLabAddin, addin.fs, near line 113, there is a InitCtxtMenu function:

[code]

let InitCtxtMenu () =
if not ctxtMenuInit then
let bars = appObj.CommandBars :?> Microsoft.VisualStudio.CommandBars.CommandBars
let bar = bars.Item("Code Window")
for menubar in bar.Controls do
if menubar.Caption = "SendTo" then
sendToMenuItem <- menubar
sendToMenuItemFound <- true
if sendToMenuItemFound then  
sendToMenuItem.Visible <- true  
else
MessageBox.Show("Error loading the Code Window context menu item") |> ignore
ctxtMenuInit <- true
[/code]

I think there is an error in this line:

  if menubar.Caption = "SendTo" then

because there is no "SendTo" button on my Visual Studio 2008 installation.  

I changed the code to

  if menubar.Caption = "Send To F# Interactive" then

This fixed the first error.  No more message box...

Now, I am wondering why you look for the caption?  Won't the caption change based on the Localization of the current computer (internationalization)?  I'm guessing it will say something different in French, Chinese, etc. etc.?  

And, there is still a problem after that fix...

dteExecuteCommand in VSLabFSICore, environment.fs still raises errors on the following commands:

VSLabAddin+Addin.FSIExec  #I @"C:\Documents and Settings\NA\Application Data\Unipi\VSLab\packages\"

and 

VSLabAddin+Addin.FSIExec  #I @"C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2904.0"

There was one other problem.  When I tried to build the project from source code, the project file for "Installer Actions" had to be upgraded to use the .Net Framework 3.5, from the 2.0 framework.

In summary, I have no idea how you are able to build and test this source code on your machine.  I think the current release is unequivically broken, and unusuable, on Visual Studio 2008.

I appreciate your work on this project team.  I would love to be able to use the program, because I think it will be an awesome replacement for Matlab.  I'll look into the dteExecuteCommand later when I get some time, but I thought I would report what I know so far.

Cheers

Nov 22, 2008 at 4:44 AM
This is what I was missing:

Press Alt-Shift-V     

EVEN THOUGH the add-in gives you a list of errors.

Now the release version is working, even without my code modification.

This requirement should be made more clear, and noted in the tutorial.  First time users will see the errors and will assume the add-in is broken, and then waste a lot of time, just as I did.

Thanks again, I'm happy to be able to use it now.
Coordinator
Nov 22, 2008 at 7:12 AM

Thanks for your feedback, some have reported the same issue though I wasn’t able to reproduce it. I’ll go through your feedback and integrate the change.

Thanks very much!

-- Ciao,

-- Antonio

From: honestas [mailto:notifications@codeplex.com]
Sent: sabato 22 novembre 2008 6.44
To: Antonio Cisternino
Subject: Re: Visual Studio 2008 Add-In Failure, Nov 2008 [vslab:40516]

From: honestas

This is what I was missing:

Press Alt-Shift-V

EVEN THOUGH the add-in gives you a list of errors.

Now the release version is working, even without my code modification.

This requirement should be made more clear, and noted in the tutorial. First time users will see the errors and will assume the add-in is broken, and then waste a lot of time, just as I did.

Thanks again, I'm happy to be able to use it now.

Read the full discussion online.

To add a post to this discussion, reply to this email (vslab@discussions.codeplex.com)

To start a new discussion for this project, email vslab@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Nov 22, 2008 at 2:20 PM
The problem only occurs on a fresh installation.  You need a fresh system to reproduce the problem.

My first post was a red-herring.  I see now that you added a button later in the code named "SendTo".  So my proposed code modification in the first fix did not solve anything.

Instead, the change I would make to the code would be this...

MessageBox.Show("Error loading the Code Window context menu item") |> ignore

should be

MessageBox.Show("Error loading the Code Window context menu item \n  You can attempt to fix this problem by ignoring the errors and pressing 'Alt+Shift+V' to reset and reload the Add-In") |> ignore

This will give first time installers of the product better information about how to fix the problem that they will experience.
Futher, I would update the tutorial's installation instructions.

Thanks again.