Terminal: Build failing

Created on 8 May 2019  路  7Comments  路  Source: microsoft/terminal

  • Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [Version 10.0.18894.1000]

  • What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

I tried building the whole solution in Release x64 with the 18362 installed from here

  • What's wrong / what should be happening instead:
    I'm getting the following error:
Error   MSB3030 Could not copy the file "F:\Code\Terminal\x64\Release\TerminalSettings.dll" because it was not found.   CascadiaPackage C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets   431 
Error   MSB3073 The command "
        echo OutDir=F:\Code\Terminal\x64\Release\TerminalSettings\
        (echo f | xcopy /y F:\Code\Terminal\x64\Release\TerminalSettings\TerminalSettings.dll F:\Code\Terminal\x64\Release\TerminalSettings.dll )
        (echo f | xcopy /y F:\Code\Terminal\x64\Release\TerminalSettings\TerminalSettings.pdb F:\Code\Terminal\x64\Release\TerminalSettings.pdb )

:VCEnd" exited with code 2. TerminalSettings    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets  138 
Error   MSB3073 The command "
        echo OutDir=F:\Code\Terminal\x64\Release\TerminalConnection\
        (echo f | xcopy /y F:\Code\Terminal\x64\Release\TerminalConnection\TerminalConnection.dll F:\Code\Terminal\x64\Release\TerminalConnection.dll )
        (echo f | xcopy /y F:\Code\Terminal\x64\Release\TerminalConnection\TerminalConnection.pdb F:\Code\Terminal\x64\Release\TerminalConnection.pdb )

:VCEnd" exited with code 2. TerminalConnection  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets  138 
Error   MSB3073 The command "
        echo OutDir=F:\Code\Terminal\x64\Release\TerminalControl\
        (echo f | xcopy /y F:\Code\Terminal\x64\Release\TerminalControl\TerminalControl.dll F:\Code\Terminal\x64\Release\TerminalControl.dll )
        (echo f | xcopy /y F:\Code\Terminal\x64\Release\TerminalControl\TerminalControl.pdb F:\Code\Terminal\x64\Release\TerminalControl.pdb )

:VCEnd" exited with code 2. TerminalControl C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets  138 

While the error is similar as #438, I don't have any spaces or special characters in my user directory.

Resolution-Duplicate

Most helpful comment

I came across exactly the same problem and figured out that it is caused by the fact that xcopy expects d instead of f for files when the language is set to German.

xcopy OpenConsole.sln OpenConsole2.sln
Ist das Ziel OpenConsole2.sln ein Dateiname
oder ein Verzeichnisname
(D = Datei, V = Verzeichnis)?

This caused the issue for me! I just replace "echo f | xcopy" with "echo d | xcopy" everywhere and the project builds fine now. Seems like the language setting should be considered when building the project.

All 7 comments

I'm not sure why that isn't working for you. I'd direct your attention to #489, which has the entire collection of issues people have run into trying to build the project. You might be able to find more help there.

1) src\host\ft_uia\Host.Tests.UIA.csproj (added " entities):

  <PropertyGroup>
    <PostBuildEvent>copy &quot;$(SolutionDir)\dep\WinAppDriver\*&quot; &quot;$(OutDir)&quot;\</PostBuildEvent>
  </PropertyGroup>

2) src\propsheet\propsheet.vcxproj (added " entities to mc.exe arguments AND added a . to $(IntermediateOutputPath) because the project uses a .dll suffix):

  <Target Name="MessageCompile" Inputs="@(MessageCompile)" Outputs="$(IntermediateOutputPath)\%(MessageCompile.Filename).h" BeforeTargets="ClCompile">
    <Exec Command="mc.exe /h &quot;$(IntermediateOutputPath).&quot; /r &quot;$(IntermediateOutputPath).&quot; @(MessageCompile)" />
  </Target>

3) src\cppwinrt.build.post.props (added " entities to xcopy arguments):

  <ItemDefinitionGroup Condition="'$(NoOutputRedirection)'=='true' And '$(ConfigurationType)'=='DynamicLibrary' And '$(DontCopyOutput)'!='true'">
    <PostBuildEvent Condition="'$(Platform)'!='Win32'">
      <Command>
        echo OutDir=$(OutDir)
        (echo f | xcopy /y &quot;$(OutDir)$(ProjectName).dll&quot; &quot;$(OpenConsoleDir)$(Platform)\$(Configuration)\$(ProjectName).dll&quot; )
        (echo f | xcopy /y &quot;$(OutDir)$(ProjectName).pdb&quot; &quot;$(OpenConsoleDir)$(Platform)\$(Configuration)\$(ProjectName).pdb&quot; )
      </Command>
    </PostBuildEvent>
    <PostBuildEvent Condition="'$(Platform)'=='Win32'">
      <Command>
        echo OutDir=$(OutDir)
        (echo f | xcopy /y &quot;$(OutDir)$(ProjectName).dll&quot; &quot;$(OpenConsoleDir)$(Configuration)\$(ProjectName).dll&quot; )
        (echo f | xcopy /y &quot;$(OutDir)$(ProjectName).pdb&quot; &quot;$(OpenConsoleDir)$(Configuration)\$(ProjectName).pdb&quot; )
      </Command>
    </PostBuildEvent>
  </ItemDefinitionGroup>

4) tools\razzle.cmd (added plain quotes):

rem call .razzlerc - for your generic razzle environment stuff
if exist "%OPENCON_TOOLS%\.razzlerc.cmd" (
    call "%OPENCON_TOOLS%\.razzlerc.cmd"
)   else (
    (
        echo @echo off
        echo.
        echo rem This is your razzlerc file. It can be used for default dev environment setup.
    ) > "%OPENCON_TOOLS%\.razzlerc.cmd"
)

5) tools\opencon.cmd (added plain quotes):

if not exist "%OPENCON%\bin\%ARCH%\%_LAST_BUILD_CONF%\OpenConsole.exe" (
    echo Could not locate the OpenConsole.exe in "%OPENCON%\bin\%ARCH%\%_LAST_BUILD_CONF%". Double check that it has been built and try again.
    goto :eof
)

and

(echo f | xcopy /Y "%_last_build%\OpenConsole.exe" %TEMP%\%copy_dir%\OpenConsole.exe) > nul
(echo f | xcopy /Y "%_last_build%\OpenConsole.exe" %TEMP%\%copy_dir%\conhost.exe) > nul
(echo f | xcopy /Y "%_last_build%\VtPipeTerm.exe" %TEMP%\%copy_dir%\VtPipeTerm.exe) > nul
(echo f | xcopy /Y "%_last_build%\Nihilist.exe" %TEMP%\%copy_dir%\Nihilist.exe) > nul
(echo f | xcopy /Y "%_last_build%\console.dll" %TEMP%\%copy_dir%\console.dll) > nul

and counting...

I came across exactly the same problem and figured out that it is caused by the fact that xcopy expects d instead of f for files when the language is set to German.

xcopy OpenConsole.sln OpenConsole2.sln
Ist das Ziel OpenConsole2.sln ein Dateiname
oder ein Verzeichnisname
(D = Datei, V = Verzeichnis)?

I came across exactly the same problem and figured out that it is caused by the fact that xcopy expects d instead of f for files when the language is set to German.

xcopy OpenConsole.sln OpenConsole2.sln
Ist das Ziel OpenConsole2.sln ein Dateiname
oder ein Verzeichnisname
(D = Datei, V = Verzeichnis)?

This caused the issue for me! I just replace "echo f | xcopy" with "echo d | xcopy" everywhere and the project builds fine now. Seems like the language setting should be considered when building the project.

I came across exactly the same problem and figured out that it is caused by the fact that xcopy expects d instead of f for files when the language is set to German.

xcopy OpenConsole.sln OpenConsole2.sln
Ist das Ziel OpenConsole2.sln ein Dateiname
oder ein Verzeichnisname
(D = Datei, V = Verzeichnis)?

@LennartF22 Could you please open a new issue with this problem specifically so we can track it? Thank you.

I can confirm this was the issue for me, changing every instance of 'echo f' with 'echo d' worked for me.

I came across exactly the same problem and figured out that it is caused by the fact that xcopy expects d instead of f for files when the language is set to German.

xcopy OpenConsole.sln OpenConsole2.sln
Ist das Ziel OpenConsole2.sln ein Dateiname
oder ein Verzeichnisname
(D = Datei, V = Verzeichnis)?

@LennartF22 Could you please open a new issue with this problem specifically so we can track it? Thank you.

The issue has already been addressed here:

507

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xmm1989218 picture xmm1989218  路  3Comments

zadjii-msft picture zadjii-msft  路  3Comments

ghost picture ghost  路  3Comments

wkbrd picture wkbrd  路  3Comments

mrmlnc picture mrmlnc  路  3Comments