繁体   English   中英

有谁知道如何修复:System.ComponentModel.Win32Exception:'系统找不到指定的文件'来自 Visual Studio?

[英]Does anyone know how to fix: System.ComponentModel.Win32Exception: 'The system cannot find the file specified' from visual studio?

private void button1_Click(object sender, EventArgs e)
{
    _ = Process.Start("C:/Users\riley/Desktop\astrobotrq.txt");
}

试试这个:

Process.Start("C:\\Users\\riley\\Desktop\\astrobotrq.txt");

这对你Process.Start(@"C:\Users\riley\Desktop\astrobotrq.txt"); . 您正在使用/而不是\

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM