Bug 20213 – Visual D not working out of the box in Community 2019
Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P1
Component
visuald
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2019-09-14T06:37:15Z
Last change time
2019-09-15T15:03:04Z
Assigned to
No Owner
Creator
Hans Adler
Comments
Comment #0 by hans.adler — 2019-09-14T06:37:15Z
First-time installation of Visual Studio Community 2019 and Visual D 50.1 with DMD+LDC. New projects (I tried Console apps and Windows apps) result in "Build failed" with both compilers. I am not shown a build log and have no idea how to get one.
This is probably something very simple, but coming from an entirely different world (Enterprise Java with NetBeans on Linux) I am completely helpless. I'll try another IDE for now to get into D, but thought I had better report this usability bug.
In case it's relevant, here is the full story of what I did:
- Install Visual Studio 2019 Community.
- Install DMD with installer from Digital Mars.
- Accept the installer's offers to also install DMC and Visual D.
(The DMD installer installed Visual D 0.49. Maybe not ideal, given
that automatic updates don't seem to work.)
- Start Visual Studio and create a project for the first time.
Select a D project for a Windows GUI app.
- Be surprised about the amount of cryptic boiler plate code in the
default app.
- Build project and get no feedback other than the words "Build failed"
in the status line.
- Find no way to get a build log, even after a web search.
- Go to "Manage Extensions" and be told Visual D is up to date.
- Go to the Visual D website and find out this is false.
- Uninstall Visual D 0.49, delete test project, and install Visual D 0.50.1.
- Find things still don't work, even with a Console app project.
- Uninstall Visual D 0.50.1, DMD and DMC, and delete test projects.
- Install Visual D 0.50.1 again, this time with the installer that
includes DMD and LDC.
- Find that still no new Visual D project can build out of the box.
- Double check Visual Studio actually works correctly by creating
a .NET Windows project. It does. But I couldn't get it to show a
raw build log, either. Just an 'Error List' after introducing a
syntax error.
Comment #1 by hans.adler — 2019-09-14T08:43:17Z
After doing all of the following things, it now works:
- Add the DMD bin directory to the PATH.
- Try to install using dub. (Doesn't work as it won't build with latest DMD.)
- Install and run PoseidonD.
- Reboot computer for a second time. (Earlier I forgot to mention the
reboot after installing Visual Studio.)
I removed DMD from the PATH and it still works, so maybe there was just a second reboot missing. Apparently I need to get into the mindset of rebooting all the time when things go wrong.
As this doesn't look like the kind of bug report now that's likely to see any action, I am marking it resolved/invalid. (I don't think it's invalid, but that seems to be the closest match.)
Comment #2 by r.sagitario — 2019-09-15T11:21:10Z
Thanks for the report. I tried to reproduce it in a fresh VM, but it worked for me with the latest release without reboot (though I restarted VS a couple of times in the process).
Did you use the VC project template? There was probably more information about the failure in the output window.
I think the issue was fixed with 0.50.1: you had to open the Visual D settings once to save the compiler path to a different place where msbuild would find it. Maybe the settings from the previous version caused this to still fail after the update.
The dmd installer should be updated to at least Visual D 0.50, though, that version is the first version that checks for updates.
Comment #3 by hans.adler — 2019-09-15T15:03:04Z
Thanks for looking into this anyway. Unfortunately I don't understand the reference to "VC project template". I created the projects using the Visual D project templates. The .NET project I tried successfully before the reboot was a C# one. Not sure if this is what you wanted to know.
Based on everything, I think it's really best not to waste any more time on this (other than getting the DMD installer updated) and just keep this report in mind for comparison in case something similar comes up in the future.