Console Application is compiled, but interactive doesn't work.
F# version 1.9.2.7
SharpDev 2.2.1. 2648

By on 9/4/2007 12:04 AM ()

Thanks for the bug report. Are you seeing any error message or stack trace with this? Or in the event log? I’m not seeing this behavior on my machine so it might be a little hard to track down without this. Also:
Are you running on #Develop installed by the installer or build from source?
Are you running under XP or Vista?
Do you have a “Send to F# Interactive” context menu item in the editor window? If so what happens when you press it?

By on 9/4/2007 2:50 AM ()

#Develop is installed.

I have "Send to F#..." menu item, and when i press it "unhandled exception has occured".

SharpDevelop Version : 2.2.1.2648
.NET Version : 2.0.50727.42
OS Version : Microsoft Windows NT 5.1.2600 Service Pack 2
Current culture : English (United States) (en-US)
Working Set Memory : 52380kb
GC Heap Memory : 7349kb

Can't create menu command : SendToFSharpInteractive
Exception thrown:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'FSharpBinding.SentToFSharpInteractive' threw an exception. ---> System.TypeInitializationException: The type initializer for '<StartupCode>.Fsi' threw an exception. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at <StartupCode>.Fsi..cctor() in C:\Users\robert\Documents\Visual Studio 2005\Projects\FSharpBinding\fsi.fs:line 52
--- End of inner exception stack trace ---
at FSharpBinding.SentToFSharpInteractive..cctor()
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at ICSharpCode.Core.Runtime.CreateInstance(String instance)
at ICSharpCode.Core.AddIn.CreateObject(String className)
at ICSharpCode.Core.MenuCommand.CreateCommand()

By on 9/4/2007 4:34 AM ()

same for me :
The cause is that the f# binaries are in a different directory (C:\bin\fsharp\bin) than the regular one.

I've added the following lines (as Robert mentioned in his blog article)

<appSettings>
<add key="alt_fs_bin_path" value="C:\bin\fsharp\bin" />


</appSettings>

to different places (in the

SharpDevelop.exe.config and in a created fsharpbinding.dll.config

file), at different places in the config file
(before & after the </configSections> anchors), but I still have the following error message :

Le fichier spécifié est introuvable <<translation : File Not Found>>
à System.Diagnostics.Process<wbr>.StartWithCreateProcess(ProcessStartInfo startInfo)
à System.Diagnostics.Process<wbr>.Start()
à <StartupCode>.Fsi..cctor() dans C:\Users\robert\Documents<wbr>\Visual Studio 2005\Projects\FSharpBinding<wbr>\fsi.fs:ligne 52

I don't see why the variable isn't taken from the lines 38->40 block of fsi.fs

Rob, do you know if there's a specific part in the config file where we should put the key, and in which config file?

Thanks

Julien

By on 9/4/2007 1:06 PM ()

Hi guys,

The correct place to put the configuration is in SharpDevelop.exe.config. The problem comes from line 39 in fsi.fs, Path.Combine doesn't work when the second argument starts with a \. So it should be:

process.StartInfo.FileName <- Path.Combine(ConfigurationManager.AppSettings.get_Item("alt_fs_bin_path"), "fsi.exe")

I'll release a patch tonight.

Cheers,
Rob

By on 9/4/2007 10:43 PM ()

Okay change the source and binaries, so it should work now. Get from the same - place thanks for your help and patience :)

By on 9/5/2007 12:44 PM ()

Now I have this exception.

Exception thrown:
System.IO.FileNotFoundException: Could not load file or assembly 'fslib, Version=1.9.2.9, Culture=neutral, PublicKeyToken=a19089b1c74d0809' or one of its dependencies. The system cannot find the file specified.
File name: 'fslib, Version=1.9.2.9, Culture=neutral, PublicKeyToken=a19089b1c74d0809'
at FSharpBinding.FSharpProject..ctor(ProjectCreateInformation info)
at FSharpBinding.FSharpLanguageBinding.ICSharpCode-SharpDevelop-Project-ILanguageBinding-CreateProject(ProjectCreateInformation info) in C:\Users\robert\Documents\Visual Studio 2005\Projects\FSharpBinding\languagebinding.fs:line 16
at ICSharpCode.SharpDevelop.Internal.Templates.ProjectDescriptor.CreateProject(ProjectCreateInformation projectCreateInformation, String defaultLanguage)
at ICSharpCode.SharpDevelop.Internal.Templates.ProjectTemplate.CreateProject(ProjectCreateInformation projectCreateInformation)
at ICSharpCode.SharpDevelop.Project.Dialogs.NewProjectDialog.OpenEvent(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

In SharpDevelop.exe.config I write:
<appSettings>
<add key="alt_fs_bin_path" value="C:\Program Files\FSharp-1.9.2.7\bin" />
</appSettings>

By on 9/5/2007 11:13 PM ()

This means its looking for the F# libraries version 1.9.2.9 and you have installed version 1.9.2.7. I should have staticly linked them - I'll fix this in the next release (hopefully Sunday with some more functionality).

There are 3 options available to you (roughly in order of easy of resolution):

1. Install version 1.9.2.9 (ensuring to update the path in SharpDevelop.exe.config)

2. Add settings to SharpDevelop.exe.config to redirect the assembly bindings to version 1.9.2.7 (not tested):
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="fslib"
publicKeyToken="a19089b1c74d0809"
culture="neutral" />
<bindingRedirect oldVersion="1.9.2.9"
newVersion="1.9.2.7"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

3. Recompile the addin on your machine against version 1.9.2.7

By on 9/6/2007 1:08 AM ()

Thanks.

By on 9/6/2007 1:35 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper