It seems I am not able to call a dummy function created in F# from C# and/or VB.Net in Visual Studio 2010 Beta 1.
Most references dug up by Google resolve issues arising in older versions of Visual Studio and CTPs of F#.
It would rock if somebody could post a small howto. Thanks in advance.
F#:
// in Program.fs, last file in project
let Foo() =
printfn "Hello from F#"
C#:
Program.Foo();
F#:
namespace MyFSharpCode
type MyType() =
static member Foo() =
printfn "Hello from F#"
C#:
MyFSharpCode.MyType.Foo();
You will need to make the F# code publicly available to other callers by encapsulating it in a type.
Related
Hi i know that can use ironscheme in c#(visual studio) and i donlowd ironscheme from http://ironscheme.codeplex.com/ on my visual studio 2012 but i dont know how i can use with ironscheme in visual studio .for example i get this sample from http://einarwh.wordpress.com/tag/asp-net-mvc/
that writed with lisp in visual studio but i cant use from this code .
How i should new a project in visual studio for lisp and c# together ?
i know all of function and .... lisp & ironscheme but i cant use that in visual studio with c# !
The documentation for IronScheme is located here: http://ironscheme.codeplex.com/documentation
If you go about halfway down that page, you will find two subtopics called "Using .NET from IronScheme" and "Using IronScheme from .NET". There, you will find an Eval function which you can use from C#, and some Scheme methods for interacting with the .NET framework.
Example (from Playing with IronScheme):
I'm going to school for computer programming and I have been using Xcode and really like its predictive text input (or whatever you call it maybe interpreter). The only thing is that it seems to function a little different when creating a C++ project. Such as you don't have to say "#include " to use the string library. Where as in Visual Studio you have to. What i'm afraid of is turning in a class project done on Xcode and missing including a lib and losing points. So i would like to do it on VS 2010 but i would like to have a better interpreter. Any help on this.
I think you mean AutoComplete..... and there is an add on called Visual Assist X that makes it magic for C++ coding.
I'm using Visual C++ in Visual Studio 2010 Express, and in the past I remember when you use a string object and after the dot (eg: .) all the member functions will show in list, but that's not happening.
string myString = "hello world";
myString.
After typing the dot, all functions that are part of the string class don't show. Where in Visual C++ is the setting to make them show?
The functionality you refer to is called IntelliSense in Microsoft-speak, their version of autocompletion for variable names, functions, and methods.
IntelliSense is not supported in Visual Studio 2010 for C++/CLI projects. You will only get IntelliSense for projects written in native C++ code. This is explained in more detail here on the Visual C++ Team Blog. There is also a bug filed on Microsoft Connect; the official word is this:
Thanks for your feedback. Unfortunately in this release we had to cut the intellisense support for C++/CLI due to time constraints. If you want to get some intellisense like quick info and memberlist on the native classes you can get it by choosing no /clr support in the project properties.
Thank You!
Visual C++ Team
This is unfortunate news for many of us who work with C++/CLI projects, and we aren't left with many options. A question regarding those options has been asked here: What are people replacing the missing C++/CLI Intellisense in VS 2010 with? The summary is people are either going back to VS 2008
(I believe the Express Edition of 2008 is still available for download if you look around), or purchasing third-party software such as Visual Assist X that promises to bring back IntelliSense.
It's worth mentioning, however, that Microsoft does not regard C++/CLI as a "first-class" .NET language. There's little (if any) reason to start new projects using the language. It's designed for interop purposes between native C++ and managed C# applications. If you want to write C++, you should target the native Windows API (create a new Win32 project in VS). If you want to write managed .NET code, it is highly recommended that you use C# instead (that's a different version of Express that must be downloaded separately). The syntax is very similar between C++ and C#, but you will still have to learn the .NET Framework and idioms. Both native C++ projects and managed C# projects have very much improved IntelliSense support in Visual Studio 2010, so you're guaranteed to be much happier with either of those.
Is there a way to use boo in my msvs? I would like my form to call some boo code instead of C#.
I'm using Boo to replace an old database-driven clunky rules engine, and it's working great.
Start here: Boo Interactive Interpreter
// One-line Boo interpreter in C#
InteractiveInterpreter2 interpreter = new InteractiveInterpreter2();
If you mean defining your forms and actually coding Boo in VS .NET, look into BooLangStudio.
We've been working on a plug-in for a while, it sorta works but you should really use SharpDevelop or MonoDevelop at this point. The VS plugin might get revitalized since the new VS plugin architecture for VS2010 is so much better but it's really a lot of work and we have all been pretty busy.
Visual Boo (source code) is a more recent project adding support for Boo in VS2010.
You can have your Boo script pop-up a source-readable VS debugger by inserting:
System.Diagnostics.Debugger.Launch()
or
System.Diagnostics.Debugger.Break()
If by msvs you mean visual studio, you would have to write a language plugin for boo (assuming one does not exist) using the Visual Studio Extendability framework.
Here is such a plugin :
http://www.codinginstinct.com/2008/05/boo-in-visual-studio.html
Visual studio type library
I'm trying from Delphi to open up Visual Studio (for editing SSRS reports), and load up a particular projectitem from a solution file I have autogenerated.
I have imported the visual studio type library, and can create the object,
and drill through the solution until I have the right ProjectItem
objDTE := CreateOleObject('VisualStudio.DTE') as DTE;
However I am now at the point where I have the ProjectItem, and want to
do the following
_ProjectItem.Open(vsViewKindDesigner);
Unfortunately vsViewKindDesigner is some sort of constant that I can't
find a type library for, and it must relate to a particular Guid underneath.
Any ideas where I can import this type library from in order to use this constant in the ProjectItem.Open method?
ProjectItem = interface(IDispatch)
['{0B48100A-473E-433C-AB8F-66B9739AB620}']
.... etc
function Open(const ViewKind: WideString): Window; safecall;
.... etc
Thanks!
vsViewKindDesigner = {7651A702-06E5-11D1-8EBD-00A0C90F26EA} (Designer view).
source: http://msdn.microsoft.com/en-us/library/aa301250(VS.71).aspx
Have you looked for that constant in the Visual Studio SDK? MSDN? Google?
See http://social.msdn.microsoft.com/Search/en-US/?Query=vsViewKindDesigner.