我在构建VC ++ MFC项目时遇到了如下问题 视觉stdio 2017.我重新安装了我的vs 2017但它仍然存在。它有 与我的代码和之前正确运行的所有项目无关 由于同样的问题无法建立。错误指定了 代码
<!-- Precompiled headers - need to build them first -->
<CL Condition="'%(ClCompile.PrecompiledHeader)' == 'Create' and '%
(ClCompile.ExcludedFromBuild)'!='true' and '%(ClCompile.CompilerIteration)'
== ''"
in D:\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets.
我尝试禁用PrecompiledHeader,但它不起作用。
MSB4018 The “CL” task failed unexpectedly
System.TypeInitializationException: The type initializer for
“Microsoft.Build.Utilities.FileTracker”threw an exception。 --->
System.IO.FileNotFoundException: The system can not find the file
specified. (Exception from HRESULT:0x80070002) in
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32
errorCode, IntPtr errorInfo) in
Microsoft.Build.Shared.NativeMethodsShared.ThrowExceptionForErrorCode(Int32
errorCode) in
Microsoft.Build.Shared.NativeMethodsShared.GetLongFilePath(String
path) in Microsoft.Build.Utilities.FileTracker..cctor() --- End
of internal exception stack trace --- in
Microsoft.Build.Utilities.FileTracker.FormatRootingMarker(ITaskItem[]
sources) in Microsoft.Build.CPPTasks.CL.ComputeOutOfDateSources()
in Microsoft.Build.CPPTasks.TrackedVCToolTask.SkipTaskExecution()
in Microsoft.Build.Utilities.ToolTask.Execute() in
Microsoft.Build.CPPTasks.TrackedVCToolTask.Execute() in
Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
in
Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()