vs2019報錯:配置“Debug|Win32”的 Designtime 生成失敗。IntelliSense 可能不可用 出錯內容

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,問題解決。

 

總結

該報錯由路徑錯誤引起,至於具體是哪個路徑不對,需要根據自己的項目來處理。基本上根據前面提到的方法,一步一步,應該很快能定位錯誤的位置。

 

其他參考

另外,在微軟官網上有這麼一段,不過當時是軟件BUG,現在的VS2019中,出現這個錯誤的話,一般就是路徑有問題了

https://developercommunity.visualstudio.com/content/problem/776877/error-designtime-build-failed-for-project-cuserstc.html

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 https://visualstudio.microsoft.com/downloads/. 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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章