vs2019报错:配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用 出错内容

本文解决VS2019中Designtime生成失败导致IntelliSense不可用的问题,通过调整CUDA版本引用修复。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

vs2019报错内容:
配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用

出错内容

错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    设置环境变量 TRACEDESIGNTIME = true 并重启 Visual Studio 以进行调查。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    设置环境变量 TRACEDESIGNTIME = true 并重启 Visual Studio 以进行调查。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    设置环境变量 TRACEDESIGNTIME = true 并重启 Visual Studio 以进行调查。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    设置环境变量 TRACEDESIGNTIME = true 并重启 Visual Studio 以进行调查。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    设置环境变量 TRACEDESIGNTIME = true 并重启 Visual Studio 以进行调查。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    设置环境变量 TRACEDESIGNTIME = true 并重启 Visual Studio 以进行调查。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    设置环境变量 TRACEDESIGNTIME = true 并重启 Visual Studio 以进行调查。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    设置环境变量 TRACEDESIGNTIME = true 并重启 Visual Studio 以进行调查。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    设置环境变量 TRACEDESIGNTIME = true 并重启 Visual Studio 以进行调查。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    设置环境变量 TRACEDESIGNTIME = true 并重启 Visual Studio 以进行调查。
​

查找错误

于是,按照报错中的提示,添加环境变量TRACEDESIGNTIME = true,重新打开visual studio项目,得到下面的结果

错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    检查 %TEMP% 目录中的 *.designtime.log 文件。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    检查 %TEMP% 目录中的 *.designtime.log 文件。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    检查 %TEMP% 目录中的 *.designtime.log 文件。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    检查 %TEMP% 目录中的 *.designtime.log 文件。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    检查 %TEMP% 目录中的 *.designtime.log 文件。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    检查 %TEMP% 目录中的 *.designtime.log 文件。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    检查 %TEMP% 目录中的 *.designtime.log 文件。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    检查 %TEMP% 目录中的 *.designtime.log 文件。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    检查 %TEMP% 目录中的 *.designtime.log 文件。
错误 : 项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”配置“Debug|Win32”的 Designtime 生成失败。IntelliSense 可能不可用。
    检查 %TEMP% 目录中的 *.designtime.log 文件。

这里有个问题,怎么知道%TEMP%在哪里,我通常常是在命令提示符下这做的,

C:\Users\Administrator>%temp%
'C:\Users\ADMINI~1\AppData\Local\Temp' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

可以看到,%TEMP%原来就是这个文件夹,C:\Users\Administrator\AppData\Local\Temp (根据用户名不同而不同),然后,根据提示,在其下找到这些文件,我算了一下,大概上面每一条对应4个这样的文件,总共有一大堆:

(文件名是一长串数字).designtime.log

随便打开其中一个,一直往后拉,看报错的地方,内容大致如下,

__________________________________________________
项目“D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj”(GetProjectDirectories 个目标):
​
正在使用工具版本“Current”进行生成。
D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj(55,5): error MSB4019: 找不到导入的项目“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.0.props”。请确认 Import 声明“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\\BuildCustomizations\CUDA 10.0.props”中的表达式正确,且文件位于磁盘上。
​
已完成生成项目“darknet.vcxproj”的操作 - 失败。
​
项目评估性能摘要:
        0 毫秒 D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj   1 次调用
​
项目性能摘要:
        1 毫秒 D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj   1 次调用
​
生成失败。
​
D:\mTensorflow\yolov4_darknet-master\build\darknet\darknet.vcxproj(55,5): error MSB4019: 找不到导入的项目“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.0.props”。请确认 Import 声明“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\\BuildCustomizations\CUDA 10.0.props”中的表达式正确,且文件位于磁盘上。
    0 个警告
    1 个错误
​
已用时间 00:00:01.77
​

提示找不到项目,要求确认 Import 声明“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.0.props”中的表达式正确,

处理错误

接下来,打开下面这个文件夹看一下,

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\

发现确实没有CUDA 10.0.props这个文件,但是有CUDA 10.1.props(这个是我使用的版本);

然后,用记事本打开darknet.vcxproj,所里面所有的CUDA 10.0.props都替换成CUDA 10.1.props,问题解决。

总结

该报错由路径错误引起,至于具体是哪个路径不对,需要根据自己的项目来处理。基本上根据前面提到的方法,一步一步,应该很快能定位错误的位置。

补充

很久没来,看到下面一些奇奇怪的问题,统一回复一下:这个报错不是具体针对某个项目,你不一定有darknet,更不一定有cuda硬件,具体项目是你自己编译的那个,这里只是介绍如何去找到问题的根源,你需要一步步花时间去找。具体说就是要找到那个log,定位具体哪个缺失,至于为什么缺失,是否是版本冲突,这个就要看你具体的项目了。

其他参考

另外,在微软官网上有这么一段,不过当时是软件BUG,现在的VS2019中,出现这个错误的话,一般就是路径有问题了

Visual Studio Feedback

error : Designtime build failed for project 'C:\Users\tcjso\source\repos\MazeProgram\MazeProgram\MazeProgram.vcxproj' configuration 'Debug|Win32'. IntelliSense might be unavailable. Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.

Closed - Fixed fixed in: visual studio 2019 version 16.4visual studio 2019 version 16.3windows 10.0Fixed In: Visual Studio 2019 version 16.4 Preview 4

Timothy C. Johnson Software Author reported Oct 15, 2019 at 01:31 AM

[regression] [worked-in:Don’t know - the one B4 latest update.] I got this error opening a project I was working on after the latest VS update:error : Designtime build failed for project ‘C:\Users\tcjso\source\repos\MazeProgram\MazeProgram\MazeProgram.vcxproj’ configuration ‘Debug|Win32’. IntelliSense might be unavailable. Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.Seems to have several of them.Thanks,Tim

Show comments 6

This issue is read only, because it has been in Closed–Fixed state for over 90 days. It was closed for 234 days.

Solutions

Microsoft Solution

by Visual Studio Feedback System Nov 14, 2019 at 09:19 AM

Changed state ➜ Closed - Fixed

A fix for this issue has been released! Install the most recent release from Download Visual Studio Tools - Install Free for Windows, Mac, Linux. Thank you for providing valuable feedback which has helped improve the product.

This issue has been closed for over 90 days. If we haven't resolved this issue for you, please report a new problem

Yes, it worksFixed with no extra steps0 No, I tried everythingPlease re-open this0

Solution

by Timothy C. Johnson Software Author Oct 21, 2019 at 02:55 AM

I have REPAIRED Visual Studio with VSI and the problems are not showing up anymore.Thanks,Tim

"Designtime 生成失败Intellisense 可能可用" 这是一个常见的编程错误信息,通常出现在使用集成开发环境(IDE)进行开发的过程中。 Designtime 生成失败是指在项目编译期间生成代码时出现了问题。这可能是由于配置错误、缺少依赖项或代码存在错误等原因导致的。 Intellisense 是一种代码智能提示功能,它可以在编码过程中提供代码补全、方法签名和类型检查等功能。如果Intellisense 可用,那么在编码过程中将无法获得这些有用的提示,增加了调试和开发的难度。 解决这个问题的方法有几种: 1. 检查项目配置:确保项目的配置文件正确无误,特别是与生成代码相关的部分。比如,确保生成路径、引用路径和依赖项正确配置。 2. 检查依赖项:确保项目所需的依赖项已正确安装。检查版本、引用路径和发布属性等。如果有缺失的依赖项,需要安装它们。 3. 检查代码错误:检查代码中是否存在语法错误或逻辑错误。这些错误可能导致编译过程中的问题。修复代码错误可能会解决生成失败的问题。 4. 更新或重启IDE:有时候,IDE 可能会遇到问题导致 Designtime 生成失败Intellisense 可用。尝试更新IDE到最新版本,或者尝试重启IDE,有时会解决问题。 5. 参考官方文档或社区支持:如果上述方法都无效,可以参考官方文档或开发者社区的讨论,查找其他用户可能遇到的类似问题和解决方案。 总之,处理Designtime生成失败Intellisense可用的问题需要一定的经验和技巧,需要综合考虑项目配置、依赖项和代码内容等多个方面。尽快解决这些问题有助于提高开发效率和减少调试难度。
评论 15
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值