0
我切換到Windows 10,項目建設給出了這樣的錯誤:「無法運行訪問被拒絕‘ ’指定的任務可執行文件」 VBC.EXEVS生成項目錯誤:指定的任務可執行文件「vbc.exe」無法運行。訪問被拒絕
運行Visual Studio 2015年,項目類型是類庫,目標是4.5.2。 .Net框架4.5.2安裝(附帶的Visual Studio 2015年)
我的用戶擁有所有權和充分的權限 C至VBC.EXE:\ WINDOWS \ Microsoft.NET \ Framework64 \ v4.0.30319
任何建議爲什麼會發生這種情況,以及如何解決?
使用命令行
MSBuild.exe TMF-WebApp.vbproj /t:go /v:diag /fl /flp:logfile=TMF-WebAppBuildLog.log;verbosity=diagnostic
運行的版本生成此錯誤
error MSB4019: The imported project "C:\Program Files (x86ld\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication." was not found. Confirm that the path in the <Import> declaration is cornd that the file exists on disk.
這裏是日誌文件
Build started 1/17/2017 8:20:08 AM.
Project "TMF-WebApp.vbproj" on node 1 (go target(s)).
Building with tools version "4.0".
TMF-WebApp.vbproj(1779,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "TMF-WebApp.vbproj" (go target(s)) -- FAILED.
Deferred Messages
Detailed Build Summary
======================
============================== Build Hierarchy (IDs represent configurations) =====================================================
Id : Exclusive Time Total Time Path (Targets)
-----------------------------------------------------------------------------------------------------------------------------------
0 : 0.269s 0.269s TMF-WebApp.vbproj (go)
============================== Node Utilization (IDs represent configurations) ====================================================
Timestamp: 1 Duration Cumulative
-----------------------------------------------------------------------------------------------------------------------------------
636202596087034282: 0 0.285s 0.285s #####
-----------------------------------------------------------------------------------------------------------------------------------
Utilization: 100.0 Average Utilization: 100.0
Build FAILED.
"TMF-WebApp.vbproj" (go target) (1) ->
TMF-WebApp.vbproj(1779,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.40
謝謝
請以管理員身份運行您的visual studio 2015,此外,我還創建了一個簡單的演示文件,並使用「C:\ Program Files(x86)\ MSBuild \ 14.0 \ bin \ vbc.exe」作爲您的項目並構建項目。 「C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319」,請分享您的構建日誌,並檢查它是否有這樣一行:任務「Vbc」 1> C:\ Program Files文件(x86)\ MSBuild \ 14.0 \ bin \ vbc.exe/noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Gener –
@ ColeWu-MSFT嘗試以管理員身份運行,相同的行爲以及有關vbc.exe缺少訪問權限的錯誤。 – jprusakova
@ ColeWu-MSFT我發佈了構建日誌和我在命令行上運行msbuild的錯誤 – jprusakova