Where is Visual-D C# code?

default0 via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Sat Oct 31 06:49:19 PDT 2015

On Saturday, 31 October 2015 at 08:31:54 UTC, Rainer Schuetze 
> On 31.10.2015 00:19, Ramon wrote:
>> I use Visual-D for Visual Studio daily for writing D programs. 
>> Also I am
>> very experienced in writing Visual Studio extensions, I wrote 
>> this
>> commercial one: http://misoftware.rs/OmniCode.
>> Now, looking at Visual-D source code, 85% is D code. Well, at 
>> first it
>> seems OK to write a D extension for D in D, but I wonder, how 
>> do you
>> manage to use all .NET APIs from D?
>> Because for implementing every aspect of a language extension 
>> in Visual
>> Studio (Intellisense, outlining, QuickInfo, signature help, 
>> snippets),
>> in my experience, you really need to work with the .NET 
>> assemblys of the
>> Visual Studio Extensibility SDK. I guess you are doing it in a 
>> old COM
>> way, which I think is still supported by VS. But I think that 
>> is far
>> from being productive. Also I doubt you can support every new 
>> aspect of
>> VS editor experience, because since VS 2010 I think, the 
>> editor is based
>> on WPF, so it is .NET in all its glory.
>> I am just worried if Visual-D is taking the right approach for
>> implementing stuff. I could definitely help in the C# area.
> You are right that writing Visual D in D has not been the 
> easiest way to write an extension for VS. The first attempt was 
> actually a derivation of a C# extension, but I hated it (I 
> might be more relaxed about this today). Please note that this 
> was before the release of VS2010, so VS itself was not based on 
> C# as much as today.
> My reasoning was this: why should I spend my spare time writing 
> code in a language I don't like? Writing it in D seemed natural 
> instead, and actually doing this meant contributing to the dmd 
> compiler/library/toolchain resulting in automatic conversion of 
> Windows and VS SDK to D, DLL support for D, precise GC and 
> numerous bug fixes.
> Most functionality can be accessed through COM, but WPF seems 
> to be very different. That's why there is vdextensions.csproj 
> to integrate some stuff that I didn't manage to access directly.

I seem to remember that it is possible to call into managed code 
from C++ (something like C++/CLI). Would it theoretically be 
possible to have a wrapper that allows direct access to the 
managed .NET API from D? A project like this could also help 
improve general interoperability between D and the .NET platform. 
Not sure on the specifics about these things, though, and just 
thinking about it this seems like a stupid amount of work to get 

Maybe I'm actually gonna give this a try, since I have way too 
many things to do anyways it seems to be very reasonable to start 
yet another (possibly gigantic) thing!

More information about the Digitalmars-d-ide mailing list