Open dub project?

ZombineDev via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Fri Jan 1 20:36:48 PST 2016


On Saturday, 2 January 2016 at 01:39:32 UTC, Jason Jeffory wrote:
> On Friday, 1 January 2016 at 02:46:55 UTC, ZombineDev wrote:
>> On Thursday, 31 December 2015 at 23:46:21 UTC, Jason Jeffory 
>> wrote:
>>> How can I open a dub generated project in VS with VD?  Is 
>>> there any support or do I have to create a side project and 
>>> manage it separately, more or less? If so, it would be really 
>>> cool if VD could understand dub projects!
>>
>> The Dub support in VisualD actually works backwards - you need 
>> to use Dub to get VisualD project files:
>>
>> cd my_project
>> dub generate visuald
>>
>> The above command will produce a my_project.sln file that you 
>> can now open in Visual Studio.
>
> Cool! But once the project is created, what maintains the 
> progress? If you add files through dub(a dependency), do you 
> have to regenerate the project again?

Dub is the only source of truth, so yes, you will need to 
regenerate the project files if you add/remove/modify a 
dependency. However, if you are only adding/removing/modifying a 
file in your project, it may work fine.

Because this easily becomes tedious, I mainly use the D language 
binding (called Mono-D) for Xamarin Studio/MonoDevelop for 
development (on Windows and Linux) and debugging (only on Linux). 
I use VisualD only for debugging on Windows (i.e. relatively 
rare).
Mono-D has really good support for Dub - it natively underdtands 
dub.json files (so there's no need to use dub generate to create 
project files) and automatically updates it self if you change 
dub.json through the editor. The autocompletion mostly works well 
enough and the integration between dub and the solution explorer 
makes it very pleasant to use.


More information about the Digitalmars-d-ide mailing list