1) Visual Studio无论源代码是否更改,都会不断重建每个项目。
2) Intellisense也出现了问题。 每个命令都会显示“没有可用的其他信息”错误。
3) Visual Studio显示错误E1696
无法打开源文件“CURRENTLYOPENSOURCEFILEINCAPS.CPP”,尽管成功构建了该项目。 错误图标与导致构建失败的错误不同。
我已启用诊断输出。 对于零检查cmake目标,它无法找到一个生成.stamp.rule,我已经检查过,在构建之前存在,并且未被删除和重新生成,文件路径是正确的。 所有单独的项目都有类似的存在文件,但Visual Studio说它们丢失了。
我已经阅读了许多Stack Overflow帖子以使intellisense再次正常工作,但什么都没有起作用。 当使用解决方案资源管理器打开所有文件时,其中原来有文件路径的地方现在都显示“(全局范围)”。
我已经使用msbuild进行了构建,它说“正在创建“x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”,因为指定了“AlwaysCreate”。 我不知道为什么要指定AlwaysCreate。 我读到如果#include尝试包含不存在的内容,就会发生这种情况,但我不明白它是如何编译的 - 无论如何,这是一个大型代码库,如果这是原因,那么肯定检查先前提交的时候没有问题的应该可以解决它 - 但是没有。
我有一个源外构建,所以我尝试删除它并重新CMaking一切,以便清除所有缓存变量。
我尝试将每个设置重置为出厂设置。
我已禁用并行构建。
我以管理员模式运行。
我已删除我的存储库和构建输出中的所有内容,并重新克隆并检出在此之前发生的过去提交。
我尝试将源代码复制到另一个驱动器,并在驱动器的不同文件夹深度上进行了尝试。
我尝试卸载并重新安装Visual Studio两次。
可以确认,创建新的虚拟项目不会出现上述3个问题。
我尝试了删除所有内容,重置VS,重新安装VS,克隆之前工作的提交,cmaking,以管理员身份构建vs,在管理员身份下构建vs,仍然存在所有3个问题。
诊断输出中的第一个失败点1>------ Up-To-Date check: Project: ZERO_CHECK.vcxproj, Configuration: Debug x64 ------
1>Project is not up-to-date: build input 'e:\blabla\blabuilddir\cmakefiles\66f04b81c84059a8a3158e97cbfec9b8\generate.stamp.rule' is missing.
这不是必须的。
在决定/执行AlwaysCreate操作之前,还有更多输出。
>Done building target "_HandlePackageFileConflicts" in project "ALL_BUILD.vcxproj".
16>Target "ResolveAssemblyReferences" in file "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets":
16> Added Item(s):
16> _ReferenceInstalledAssemblyDirectory=
16> C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
16> C:\Program Files (x86)\Windows Kits\10\References
16> Set Property: ResolveAssemblyReferencesStateFile=x64\Debug\ALL_BUILD\ALL_BUILD.vcxprojAssemblyReference.cache
16> Set Property: ResolveAssemblyReferencesSilent=false
16> Set Property: ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch=Warning
16> Set Property: FindDependenciesOfExternallyResolvedReferences=false
16> Task "ResolveAssemblyReference" skipped, due to false condition; ('@(Reference)'!='' or '@(_ResolvedProjectReferencePaths)'!='' or '@(_ExplicitReference)' != '') was evaluated as (''!='' or ''!='' or '' != '').
16>Done building target "ResolveAssemblyReferences" in project "ALL_BUILD.vcxproj".
16>Target "GenerateBindingRedirects" skipped, due to false condition; ('$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true') was evaluated as ('' == 'true' and 'true' == 'true').
16>Target "_RemoveZipFileSuggestedRedirect" skipped, due to false condition; ('$(_TargetFrameworkVersionWithoutV)' >= '4.7.1' And '$(AllowZipFileRedirect)' != 'true') was evaluated as ('4.0' >= '4.7.1' And '' != 'true').
16>Target "GenerateBindingRedirectsUpdateAppConfig" skipped, due to false condition; ('$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and Exists('$(_GenerateBindingRedirectsIntermediateAppConfig)')) was evaluated as ('' == 'true' and 'true' == 'true' and Exists('x64\Debug\ALL_BUILD\ALL_BUILD.config')).
16>Target "ResolveComReferences" skipped, due to false condition; ('@(COMReference)'!='' or '@(COMFileReference)'!='') was evaluated as (''!='' or ''!='').
16>Target "AfterResolveReferences" in file "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets":
16>Done building target "AfterResolveReferences" in project "ALL_BUILD.vcxproj".
16>Target "ImplicitlyExpandDesignTimeFacades" skipped, due to false condition; ('$(ImplicitlyExpandDesignTimeFacades)' == 'true') was evaluated as ('' == 'true').
16>Target "ResolveTestReferences" skipped, due to false condition; ('@(Shadow)'!='') was evaluated as (''!='').
16>Target "ResolveReferences" in file "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets":
16>Done building target "ResolveReferences" in project "ALL_BUILD.vcxproj".
16>Target "PrepareForBuild" skipped. Previously built successfully.
16>Target "PrepareForBuild" skipped. Previously built successfully.
16>Target "InitializeBuildStatus" in file "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets":
16> Task "ReadLinesFromFile"
16> Task Parameter:File=x64\Debug\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate
16> Output Item(s):
16> _ReadProjectStateLine=
16> #TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
16> Debug|x64|E:\blaWork\bla\blaBuild-win64-vc15\|
16> Done executing task "ReadLinesFromFile".
16> Set Property: ProjectStateLine=#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
16> Set Property: StateBuildType=Build
16> Task "WriteLinesToFile"
16> Task Parameter:Overwrite=True
16> Task Parameter:File=x64\Debug\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate
16> Task Parameter:
16> Lines=
16> #TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
16> Debug|x64|E:\blaWork\bla\blabuild-win64-vc15\|
16> Done executing task "WriteLinesToFile".
16> Task "Touch"
16> Task Parameter:AlwaysCreate=True
16> Task Parameter:Files=x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild
16> Touching "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild".
16> Done executing task "Touch".
16>Done building target "InitializeBuildStatus" in project "ALL_BUILD.vcxproj".