1. 程式人生 > 程式設計 >vs2019報錯:配置“Debug|Win32”的 Designtime 生成失敗IntelliSense 可能不可用的問題

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.

SolutionsMicrosoft 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,pleasereport 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

總結

到此這篇關於vs2019報錯:配置“Debug|Win32”的 Designtime 生成失敗IntelliSense 可能不可用的文章就介紹到這了,更多相關vs2019報錯配置“Debug|Win32”的 Designtime 生成失敗內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!