【发布时间】:2020-12-21 10:09:31
【问题描述】:
在 .net 框架中 当我需要像双击行为一样打开文本文件时,我使用了以下代码
System.Diagnostics.Process.Start(path);
当我尝试在核心中使用时出现此错误
System.ComponentModel.Win32Exception: '指定的可执行文件不是此操作系统平台的有效应用程序。'
此异常最初是在此调用堆栈中引发的: System.Diagnostics.Process.StartWithCreateProcess(System.Diagnostics.ProcessStartInfo) System.Diagnostics.Process.Start() System.Diagnostics.Process.Start(System.Diagnostics.ProcessStartInfo) System.Diagnostics.Process.Start(字符串) HandelString.cs 中的 AccountManager.Setting.HandelString.Encrypt(string) Main.cs 中的 AccountManager.Main.Main_Load(object, System.EventArgs) System.Windows.Forms.Form.OnLoad(System.EventArgs) System.Windows.Forms.Form.OnCreateControl() System.Windows.Forms.Control.CreateControl(bool) System.Windows.Forms.Control.CreateControl() ... [调用堆栈被截断]
我阅读了很多问题并尝试了解决方案,但不适合我。
【问题讨论】: