September 14, 2013
Compiling with --build=unittest and debug works, but not --build=release:

$ dub build --build=debug
Checking dependencies in 'C:\code\d\myapp'
Building configuration "application", build type debug
Copying files...
Running dmd (compile)...
Compiling diet template 'about.dt' (compat)...
Linking...


$ dub build --build=release
Checking dependencies in 'C:\code\d\myapp'
Building configuration "application", build type release
Copying files...
Running dmd (compile)...
Compiling diet template 'about.dt' (compat)...
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2407): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2407): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2411): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2407): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2407): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2411): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2415): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2415): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2418): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2418): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2418): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2419): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2415): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)[]).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2415): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)[]).put
C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2418): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)[]).put
Error: Build command failed with exit code 1
September 16, 2013
On Saturday, 14 September 2013 at 13:10:54 UTC, simendsjo wrote:
> Compiling with --build=unittest and debug works, but not --build=release:
>
> $ dub build --build=debug
> Checking dependencies in 'C:\code\d\myapp'
> Building configuration "application", build type debug
> Copying files...
> Running dmd (compile)...
> Compiling diet template 'about.dt' (compat)...
> Linking...
>
>
> $ dub build --build=release
> Checking dependencies in 'C:\code\d\myapp'
> Building configuration "application", build type release
> Copying files...
> Running dmd (compile)...
> Compiling diet template 'about.dt' (compat)...
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2407): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2407): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2411): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2407): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2407): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2410): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2411): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2415): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2415): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2418): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2418): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2418): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2419): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, char[]).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2415): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)[]).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2415): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)[]).put
> C:\dmd\windows\bin\..\..\src\phobos\std\string.d(2418): Error: function std.string.sformat!(char, long).sformat is a nested function and cannot be accessed from std.range.put!(Sink, const(char)[]).put
> Error: Build command failed with exit code 1

I am having almost this exact same problem, but I'm also getting linker errors complaining about undefined symbols. I've got a thread about it on the Vibe forums.