Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error MSB4018: The "GetOutOfDateItems" task failed unexpectedly #4226

Closed
macrolik9 opened this issue Mar 11, 2019 · 12 comments
Closed

error MSB4018: The "GetOutOfDateItems" task failed unexpectedly #4226

macrolik9 opened this issue Mar 11, 2019 · 12 comments
Labels
C++ tasks and targets Related to C++ (vcxproj) builds, which are part of Visual Studio and not part of this repository. triaged
Milestone

Comments

@macrolik9
Copy link

macrolik9 commented Mar 11, 2019

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(2094,5): error MSB4018: The "GetOutOfDateItems" task failed unexpectedly.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(2094,5): error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\user\Desktop\op\sippin-pp-master\Release\Total Le.22B64E67.tlog\CopyFile.read.1.tlog'.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(2094,5): error MSB4018:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(2094,5): error MSB4018:    at System.IO.File.InternalDelete(String path, Boolean checkHost)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(2094,5): error MSB4018:    at System.IO.File.Delete(String path)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(2094,5): error MSB4018:    at Microsoft.Build.CPPTasks.GetOutOfDateItems.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(2094,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(2094,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
@livarcocc
Copy link
Contributor

Do you have a repro for this?

@livarcocc livarcocc added this to the Discussion milestone Mar 11, 2019
@davidbuckleyni
Copy link

Did u ever fix this I am getting the same >

@liuyazui
Copy link

I also get this issue.
1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(185,5): error MSB4018: The "GetOutOfDateItems" task failed unexpectedly.
1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(185,5): error MSB4018: System.NotSupportedException: The given path's format is not supported.
1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(185,5): error MSB4018: at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(185,5): error MSB4018: at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(185,5): error MSB4018: at Microsoft.Build.CPPTasks.MsbuildTaskUtilities.GetWildcardExpandedFileListFromMetadata(IBuildEngine buildEngine, ITaskItem item, String metadataName, Boolean convertToUpperCase)
1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(185,5): error MSB4018: at Microsoft.Build.CPPTasks.GetOutOfDateItems.Execute()
1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(185,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(185,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

@rainersigwald
Copy link
Member

The task that's failing is part of the C++ SDK, which is not part of this repo. Can you please file Visual Studio Feedback to report the bug to that team? Please link the feedback item here so that others can find and upvote it.

One thing that would likely be helpful in the bug report is the inputs to the task. Those are logged when the build verbosity is set to diagnostic.

@rainersigwald rainersigwald added the C++ tasks and targets Related to C++ (vcxproj) builds, which are part of Visual Studio and not part of this repository. label Jun 13, 2019
@gvanem
Copy link

gvanem commented Jul 23, 2019

@macrolik9 I'm having the exact same issue. It doesn't help that the MSbuild error messages are so damn cryptic. This is probably causes by some VSinstaller gone wild (since it installs stuff in 2 or 3 places totally disregarding previously installed locations. Yikes!).

@TomzBench
Copy link

I get this error on some projects and not on others...

@rainersigwald
Copy link
Member

@TomzBench Can you please file Visual Studio feedback, ideally with the logs mentioned in #4226 (comment)?

I'm going to close this because this failure appears to be caused by C++ tasks.

@TomzBench
Copy link

TomzBench commented Dec 4, 2019

Hey thanks @rainersigwald - It turns out my issue was related to my file path being too long! Apparently having path strings longer than 260 chars can be a problem on Windows. Good to know - I think it's good to leave this feedback here because I don't know how to use Visual Studio Feedback. I got this error using MSBuild via CMAKE....

@rainersigwald
Copy link
Member

@TomzBench you may also be interested in #53 (comment).

@TomzBench
Copy link

@rainersigwald Awesome that this is fixed. Is a "preview" build considered a stable release? Or is there some time to wait until it's on a stable release?

@rainersigwald
Copy link
Member

That post was a while ago; the fix is in all stable releases of Visual Studio 2019 (but still requires the OS-level opt-in and has the other caveats).

@TomzBench
Copy link

Ok i'll try opting in and seeing if that fixes for me, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ tasks and targets Related to C++ (vcxproj) builds, which are part of Visual Studio and not part of this repository. triaged
Projects
None yet
Development

No branches or pull requests

8 participants