diff --git a/source/dub/generators/visuald.d b/source/dub/generators/visuald.d
index 56bad34..f0c861f 100644
--- a/source/dub/generators/visuald.d
+++ b/source/dub/generators/visuald.d
@@ -283,7 +283,7 @@
// Lib or exe?
bool is_lib = pbuildsettings.targetType != TargetType.executable;
string debugSuffix = type == Config.Debug? "_d" : "";
- auto bin_path = Path(pbuildsettings.targetPath);
+ auto bin_path = pack is m_app.mainPackage ? Path(pbuildsettings.targetPath) : Path(".dub/lib/");
bin_path.endsWithSlash = true;
ret.formattedWrite("
%s
@@ -324,7 +324,7 @@
uint ndummy = 0;
foreach (i; 0 .. relpackpath.length)
if (pack.path[i] == "..") ndummy++;
- string intersubdir = (ndummy*2 > relpackpath.length ? replicate("dummy/", ndummy*2-relpackpath.length) : "") ~ "/" ~ pack.name;
+ string intersubdir = (ndummy*2 > relpackpath.length ? replicate("dummy/", ndummy*2-relpackpath.length) : "") ~ pack.name;
// Not yet dynamic stuff
ret.formattedWrite("
@@ -368,8 +368,8 @@
0
0
0
- $(ConfigurationName)
");
+ ret.formattedWrite(" %s\n", bin_path.toNativeString());
ret.formattedWrite(" .dub/obj/%s\n", intersubdir);
ret.formattedWrite("%s",
"