VS build project error: The specified task executable "vbc.exe" could not be run. Access is denied
VS build project error: The specified task executable "vbc.exe" could not be run. Access is denied
我正在切换到 Windows 10,项目构建出现此错误:
"The specified task executable "vbc.exe“无法 运行。访问被拒绝”
运行 Visual Studio 2015,项目类型是class库,目标是4.5.2。
.Net Framework 4.5.2 已安装(Visual Studio 2015 附带)
我的用户拥有 vbc.exe 的所有权和完全权限
C:\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
谢谢
事实证明,使用的 vbc.exe 是从 nuget 包中提取的,该包是从旧机器复制过来的。权限实际上是乱七八糟的,文件不能运行。
当 运行 在 VisualStudio 中构建时,None 是可见的。
@ColeWu-MSFT' 寻找日志的建议(也无法从 Visual Studio 构建中获取)让我 运行ning command-line 构建产生更有用的诊断。
我正在切换到 Windows 10,项目构建出现此错误: "The specified task executable "vbc.exe“无法 运行。访问被拒绝”
运行 Visual Studio 2015,项目类型是class库,目标是4.5.2。 .Net Framework 4.5.2 已安装(Visual Studio 2015 附带)
我的用户拥有 vbc.exe 的所有权和完全权限 C:\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
谢谢
事实证明,使用的 vbc.exe 是从 nuget 包中提取的,该包是从旧机器复制过来的。权限实际上是乱七八糟的,文件不能运行。
当 运行 在 VisualStudio 中构建时,None 是可见的。 @ColeWu-MSFT' 寻找日志的建议(也无法从 Visual Studio 构建中获取)让我 运行ning command-line 构建产生更有用的诊断。