You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux Makefile project is not building from MSBuild (builds fine from Visual Studio)
Steps to Reproduce
In Visual Studio add a remote connection (Tools > Options > Cross Platform > Connection Manager > Add)
In Visual Studio create a new "Makefile project"
Rename it to "myprog"
In Project Propertied > Remote Build specify:
Build Command Line: make
Outputs: $(Platform)/$(Configuration)/myprog
Make sure project builds from Visual Studio
Delete bin and obj files from the project folder
Open "Developer Command Prompt for VS 2019", change current folder to the project folder, run the following command :
It fails. Note, if the folder obj\x64\Debug exists (even empty), it works.
Expected Behavior
Should build
Actual Behavior
You will get the following output:
>msbuild /property:Configuration=Debug /property:Platform=x64 /verbosity:normal .\myproj.vcxproj
Microsoft (R) Build Engine version 16.8.1+bd2ea1e3c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 17/11/2020 10:33:00 AM.
Project "C:\myproj\myproj.vcxproj" on node 1 (default targets).
_ValidateSources:
Validating sources
_CopySources:
Copying sources remotely to '*****'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Lin
ux.Makefile.Targets(261,5): error : Exception occured while copying sources to remote machine - Could not find a part o
f the path 'C:\myproj\obj\x64\Debug\1085594582.Local_Remote_PathMapping.tlog'. [C
:\Users\andreyb\source\repos\Project4\Project4\myproj.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Lin
ux.Makefile.Targets(261,5): error : Could not find a part of the path 'C:\myproj\
obj\x64\Debug\1085594582.CopySourcesUpToDateFile.tlog'. [C:\myproj\myproj.vcxproj
]
Done Building Project "C:\myproj\myproj.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\myproj\myproj.vcxproj" (default target) (1) ->
(_CopySources target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\L
inux.Makefile.Targets(261,5): error : Exception occured while copying sources to remote machine - Could not find a part
of the path 'C:\myproj\obj\x64\Debug\1085594582.Local_Remote_PathMapping.tlog'.
[C:\myproj\myproj.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\L
inux.Makefile.Targets(261,5): error : Could not find a part of the path 'C:\Users\andreyb\source\repos\Project4\Project
4\obj\x64\Debug\1085594582.CopySourcesUpToDateFile.tlog'. [C:\myproj\myproj.vcxpr
oj]
0 Warning(s)
2 Error(s)
Time Elapsed 00:00:01.87
Analysis
If I add the following workaround (modify project file), it starts to work:
The workaround here is the solution I'd expect. MSBuild doesn't control the Linux.Makefile.Targets file. I see it's installed under VS, is this on the cpp side of things? @yuehuang010
It looks like ConsolidateSourcesToCopy could do an existence check on the output directory if it doesn't exist.
Issue Description
Linux Makefile project is not building from MSBuild (builds fine from Visual Studio)
Steps to Reproduce
In Visual Studio add a remote connection (Tools > Options > Cross Platform > Connection Manager > Add)
In Visual Studio create a new "Makefile project"
Rename it to "myprog"
Add file
main.cpp
like thisAdd file
makefile
(no extension) like this (note, it needs real tabs, not replaced by spaces, otherwise you'd get "*** missing separator")In Project Propertied > Remote Build specify:$(Platform)/$ (Configuration)/myprog
Build Command Line: make
Outputs:
Make sure project builds from Visual Studio
Delete
bin
andobj
files from the project folderOpen "Developer Command Prompt for VS 2019", change current folder to the project folder, run the following command :
It fails. Note, if the folder
obj\x64\Debug
exists (even empty), it works.Expected Behavior
Should build
Actual Behavior
You will get the following output:
Analysis
If I add the following workaround (modify project file), it starts to work:
Versions & Configurations
Microsoft (R) Build Engine version 16.8.1+bd2ea1e3c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
16.8.1.52902
The text was updated successfully, but these errors were encountered: