获取版本任务意外失败 [英] Get Version Task failed unexpectedly

查看:85
本文介绍了获取版本任务意外失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我修复了Visual Studio,但每次尝试构建我的Web项目时都会这样:

I have repaired Visual Studio, however this is what follows each time I try to Build my Web project:

严重性   代码   描述   项目   文件   行   抑制状态

错误        "GetVersionTask"任务意外失败。

System.ComponentModel.Win32Exception(0x80004005):系统找不到指定的文件

  在System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)

  在System.Diagnostics.Process.Start()

  在System.Diagnostics.Process.Start(ProcessStartInfo startInfo)

  在InlineCode.GetVersionTask.Execute()in x:\ Users \ user \ AppData \ Local \Temp \(x)\(y)cs:line(x)

) 在Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

  在Microsoft.Build.BackEnd.TaskBuilder。< ExecuteInstantiatedTask> d__26.MoveNext()   


我发现很难理解我错过了什么。这是一个Win32Exception。

Severity    Code    Description    Project    File    Line    Suppression State
Error        The "GetVersionTask" task failed unexpectedly.
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at InlineCode.GetVersionTask.Execute() in x:\Users\user\AppData\Local\Temp\(x)\(y)cs:line (x)
)   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()   
I find it hard to understand what I am missing. It is a Win32Exception.

推荐答案

您好Edwardcho,

Hi Edwardcho,

欢迎来到MSDN论坛。

Welcome to MSDN forum.

抱歉延误。我试图搜索有关 GetVersionTask
的信息,但没有运气。它似乎是客户在 $中的自定义任务开发人员b $ b这样

Sorry for the delay. I tried to search info about GetVersionTask but no luck. It seems a custom task developer by customer in this way.

关于为什么会出现这个问题:根据消息"系统找不到指定的文件"和" at
System.Diagnostics.Process。启动(ProcessStartInfo startInfo)
",我认为你的.csproj文件中有一个目标或者调用GetVersionTask的地方,GetVersionTask中定义的Execute()方法将运行如下代码:Process.Start()
启动.exe或者什么,但是传递给Process.Start()的.exe文件不存在!

And about why this issue occurs: According to message "The system cannot find the file specified" and "at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)", I think there could be a target in your .csproj file or somewhere which calls GetVersionTask, and the Execute() method defined in the GetVersionTask will run code like: Process.Start() to start a .exe or what, but the .exe file which would be passed to Process.Start() doesn't exist!

我的解决建议这个问题是正确传递路径。
(如果我误解了任何内容,请随时纠正我)

My suggestion to solve this problem is to correctly pass the path. (If i misunderstand anything, please feel free to correct me)

请尝试创建一个新的网络应用并构建它,同样的问题仍然存在?此外,如果您可以找到调用GetVersionTask的语句或定义GetVersionTask内容的语句,请分享一些有关它们的详细信息以帮助解决问题。

Please try creating a new web-app and build it, same issue persists? Also, if you can find the statement where call the GetVersionTask or where define the content of GetVersionTask, please share some details about them to help trouble-shooting.

希望以上所有有所帮助,期待回复。

Hope all above helps, looking forward to your reply.

最好的问候

Lance


这篇关于获取版本任务意外失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆