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
{{ message }}
Repository navigation
Corefx native build produces a warning on latest VS Preview (16.4.0 Preview 1.0 29311.250) #30845
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(230,5): error MSB8065: Custom build for item "D:\corefx\artifacts\obj\native\netcoreapp-Windows_NT-Debug-x64\CMakeFiles\8c5af364b615efc1be57a6c3114709e4\INSTA
LL_force.rule" succeeded, but specified output "d:\corefx\artifacts\obj\native\netcoreapp-windows_nt-debug-x64\cmakefiles\install_force" has not been created. This may cause incremental build to work incorrectly. [D:\corefx\artifacts\obj\native\netcoreapp-Windows_NT-Debug
-x64\install.vcxproj] [D:\corefx\src\Native\build-native.proj]
The build shows as failed even though it didn't really fail because the native step produced a warning so it keeps going. (We might need to propagate the TreatWarningsAsErrors to the native build command), but that is not the real issue there.
Update: after an investigation, I think this is a cmake issue where the generated project is not doing the right thing. So basically they define some CustomBuild commands which are executed by MSBuild targets and they define an input and an output. However, the command that is defined in the generated vcxproj is a nop, hence it doesn't produce any output.
Why was it not warning before? I cracked opened the MSBuild tasks dll for the new VS preview, it seems like they added validation that the CustomBuild command actually produces the output it states it does, so that is why now we get a warning.
We could change the model on how we build and install the native lib, by instead of calling MSBuild directly on install.vcxproj, we could call
So while I get a response, I think we should explicitly set TreatWarningsAsErrors=false when doing the native build in order to avoid confusing people, as a lot people has reached me asking why the build is failing, thinking it actually failed when it didn't.
CMake has merged the fix and apparently is going to make it to the next release of 3.15 -- I will follow their releases and close this issue once the fix is publicly accessible by installing a new version of cmake.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(230,5): error MSB8065: Custom build for item "D:\Sources\NetFoundation\dotnet\corefx\artifacts\obj\native\netcoreapp-Windows_NT-Debug-x64\CMakeFiles\af7b5fb01ed3438277a908fb1341432f\INSTALL_force.rule" succeeded, but specified output "d:\sources\netfoundation\dotnet\corefx\artifacts\obj\native\netcoreapp-windows_nt-debug-x64\cmakefiles\install_force" has not been created. This may cause incremental build to work incorrectly. [D:\Sources\NetFoundation\dotnet\corefx\artifacts\obj\native\netcoreapp-Windows_NT-Debug-x64\install.vcxproj] [D:\Sources\NetFoundation\dotnet\corefx\src\Native\build-native.proj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(230,5): error MSB8065: Custom build for item "D:\Sources\NetFoundation\dotnet\corefx\artifacts\obj\native\netcoreapp-Windows_NT-Debug-x64\CMakeFiles\af7b5fb01ed3438277a908fb1341432f\INSTALL_force.rule" succeeded, but specified output "d:\sources\netfoundation\dotnet\corefx\artifacts\obj\native\netcoreapp-windows_nt-debug-x64\cmakefiles\install_force" has not been created. This may cause incremental build to work incorrectly. [D:\Sources\NetFoundation\dotnet\corefx\artifacts\obj\native\netcoreapp-Windows_NT-Debug-x64\install.vcxproj] [D:\Sources\NetFoundation\dotnet\corefx\src\Native\build-native.proj]
Seems the issue is linked to VS 2019 16.4.0 Preview 1.0
Thanks, @Simon-IT, unfortunately the fix was incomplete and was not done for built-in cmake targets, like install target (which is the one we're hitting it on). The issue I linked above, was re-opened and assigned a 3.16.0 milestone, so we will have to wait until a new fix, unfortunately 😢
Activity
ViktorHofer commentedon Sep 13, 2019
Something must have changed on the VS's side. Let's keep this open and investigate further if this still happens with a later 16.4-preview version.
Sounds good but let's not do this before the issue disappeared.
safern commentedon Sep 19, 2019
Update: after an investigation, I think this is a cmake issue where the generated project is not doing the right thing. So basically they define some
CustomBuildcommands which are executed by MSBuild targets and they define an input and an output. However, the command that is defined in the generatedvcxprojis a nop, hence it doesn't produce any output.Why was it not warning before? I cracked opened the MSBuild tasks dll for the new VS preview, it seems like they added validation that the
CustomBuildcommand actually produces the output it states it does, so that is why now we get a warning.We could change the model on how we build and install the native lib, by instead of calling MSBuild directly on install.vcxproj, we could call
However I don't know how much warnings or msbuild output we would lose by doing that.
In the meantime I opened an issue on cmake: https://gitlab.kitware.com/cmake/cmake/issues/19737
So while I get a response, I think we should explicitly set
TreatWarningsAsErrors=falsewhen doing the native build in order to avoid confusing people, as a lot people has reached me asking why the build is failing, thinking it actually failed when it didn't.safern commentedon Sep 25, 2019
CMake has merged the fix and apparently is going to make it to the next release of 3.15 -- I will follow their releases and close this issue once the fix is publicly accessible by installing a new version of cmake.
Simon-IT commentedon Oct 1, 2019
Hi. Form me, the issue remains for CMake 3.15.3.
Seems the issue is linked to VS 2019 16.4.0 Preview 1.0
safern commentedon Oct 1, 2019
That is expected, the fix will be part of CMake 3.15.4 -- I don't know when it is expected to release, but from looking at the Milestone assigned to the issue I filed: https://gitlab.kitware.com/cmake/cmake/issues/19737 that milestone was done yesterday, so the release should be soon.
Simon-IT commentedon Oct 4, 2019
@safern Unfortunately the bug remains for 3.15.4
safern commentedon Oct 7, 2019
Thanks, @Simon-IT, unfortunately the fix was incomplete and was not done for built-in cmake targets, like
installtarget (which is the one we're hitting it on). The issue I linked above, was re-opened and assigned a 3.16.0 milestone, so we will have to wait until a new fix, unfortunately 😢Simon-IT commentedon Oct 8, 2019
Thanks @safern for the support...
Gnbrkm41 commentedon Oct 14, 2019
FWIW, 3.16.0-rc1 is available and I do not see the errors with it installed.
ViktorHofer commentedon Oct 14, 2019
Thanks for testing @Gnbrkm41. I just updated the docs (dotnet/corefx@81c91fa) and close this issue as fixed.