日期:2014-05-18  浏览次数:21801 次

csc找不到源文件
系统是vista,装的是vs.net2005

以下为HelloWorld.cs,保存在d盘

using System;
using System.Collections.Generic;
using System.Text;
using System.IO.TextWriter.Encoding;

namespace HelloWorld
{
  class Program
  {
  static void Main(string[] args)
  {
  Console.Write("Hello World!");
  }
  }
}

Path环境变量已添加: C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin;

但运行csc d:\HelloWorld.cs出错
error CS2001:未能找到源文件"d:\HelloWorld.cs"
fatal error CS2008:未指定输入

------解决方案--------------------
还真是神奇啊...

1.绝对地确定文件所在位置。
2.注意文件名的拼写。