我正在编写一个 C# winform 应用程序。一切顺利,但突然调试不起作用。我收到此错误消息:
Error while trying to to run project: Unable to start program [here follows the path of the executable] Input or output cannot be redirected because the specified file is invalid.
这是 .sln 文件
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stub", "Stub\Stub.csproj", "{C6376D67-EEEC-4AEE-B779-D743D0181636}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C6376D67-EEEC-4AEE-B779-D743D0181636}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C6376D67-EEEC-4AEE-B779-D743D0181636}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C6376D67-EEEC-4AEE-B779-D743D0181636}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C6376D67-EEEC-4AEE-B779-D743D0181636}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
我将项目的属性与虚拟项目的项目属性进行了比较,发现在我的项目中调试选项卡 现场命令行选项 这个值:
No Command-line
不知道这是从哪里来的,但在删除它后,调试再次工作。
最佳答案
检查项目的属性以包含字段 命令行选项 .如果包含 No Command-line
然后将其删除。
关于visual-studio - 调试时VS错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46259468/