安装一个dotnet framework,有点象java的虚拟机。你可以找一下安装盘更新盘有一个dotnetfx.exe的程序,大概20m。
或者从ms网站down一个。http://msdn.microsoft.com/netframework/downloads/redist.aspx

解决方案 »

  1.   

    C#编写的exe文件 在没有安装.net的机器上是不能运行的。你需要在那台机器上安装一个 .net的运行环境,即安装.net再分发包,在微软的主页上有下载,大概20M
      

  2.   

    我安装过了!!可是还不行!!他运行就报错误了!!我不明白!帮帮我呀我着急呀!!
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************
    System.InvalidOperationException: The .Net Data OLE DB Provider(System.Data.OleDb) requires Microsoft Data Access Components(MDAC) version 2.6 or later.  Version 2.52.6019.0 was found currently installed.
       at System.Data.OleDb.OleDbConnection.CreateInstanceMDAC()
       at System.Data.OleDb.OleDbConnection.GetObjectPool()
       at System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString constr)
       at System.Data.OleDb.OleDbConnection.Open()
       at NewStar.Data.TnsData.Connect()
       at NewStar.Data.TnsData.OpenSqlDataSet(String SQLString, DataSet myDataSet, String TableName, Boolean blClear)
       at NewStar.Data.TnsData.OpenSqlDataSet(String SQLString, DataSet myDataSet, String TableName)
       at NewStar.Common.TnsBase.OpenData()
       at NewStar.Common.TnsBase.set_SQLString(String value)
       at GGJJ.TRenYuan..ctor(TnsData aData)
       at GGJJ.TUser..ctor(TnsData aData)
       at GGJJ.TMainData.get_User()
       at GGJJ.MainForm.MainForm_Activated(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnActivated(EventArgs e)
       at System.Windows.Forms.Form.set_Active(Boolean value)
       at System.Windows.Forms.Form.WmActivate(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 1.0.5000.0
        Win32 Version: 1.1.4322.573
        CodeBase: file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
    ----------------------------------------
    GGJJ
        Assembly Version: 1.0.1343.36310
        Win32 Version: 1.0.1343.36310
        CodeBase: file:///C:/Documents%20and%20Settings/Administrator/桌面/GGJJ.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 1.0.5000.0
        Win32 Version: 1.1.4322.573
        CodeBase: file:///c:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
    ----------------------------------------
    System
        Assembly Version: 1.0.5000.0
        Win32 Version: 1.1.4322.573
        CodeBase: file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 1.0.5000.0
        Win32 Version: 1.1.4322.573
        CodeBase: file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
    ----------------------------------------
    NewStarLibV05
        Assembly Version: 1.0.1343.29294
        Win32 Version: 1.0.1343.29294
        CodeBase: file:///C:/Documents%20and%20Settings/Administrator/桌面/NewStarLibV05.DLL
    ----------------------------------------
    System.Data
        Assembly Version: 1.0.5000.0
        Win32 Version: 1.1.4322.573
        CodeBase: file:///c:/winnt/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 1.0.5000.0
        Win32 Version: 1.1.4322.573
        CodeBase: file:///c:/winnt/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
    ----------------------------------------************** JIT Debugging **************
    To enable just in time (JIT) debugging, the config file for this
    application or machine (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.For example:<configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the machine
    rather than being handled by this dialog.
      

  3.   

    在.NET安裝盤的第五張根目錄下的DotNetFramework下面