16位ms-dos子系统;错误
本文关键字:错误 子系统 ms-dos 16位 | 更新日期: 2023-09-27 18:04:46
我编译了这段代码,没有错误。但是当在命令提示符中运行EXE时,出现"错误"16-bit ms-dos subsystem"
错误"对话框。我不知道为什么,因为在我更新Windows XP之前,它工作得很好。
代码有什么问题吗?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;
using System.Net;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
var fromAddress = new MailAddress("aaa@gmail.com", "System");
var toAddress = new MailAddress("bbb@gmail.com", "Receiver");
const string fromPassword = "xxx";
const string subject = "Message";
string body = args[0];
var smtp = new SmtpClient
{
Host = "smtp.gmail.com",
Port = 587,
EnableSsl = true,
DeliveryMethod = SmtpDeliveryMethod.Network,
UseDefaultCredentials = false,
Credentials = new NetworkCredential(fromAddress.Address, fromPassword)
};
using (var message = new MailMessage(fromAddress, toAddress)
{
Subject = subject,
Body = body
})
{
smtp.Send(message);
}
}
}
}
听起来你的XP更新可能没有正确完成或有问题。
这篇来自Microsoft的KB文章解释了可能的修复:
http://support.microsoft.com/kb/324767怎么回事?听起来你好像收到了很糟糕的消息。它不应该将。net exe识别为16位