这是不是安装的问题?

pcroal 2002-08-03 11:11:22
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace HelloWorldVS
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();

//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}

/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Name = "Form1";
this.Text = "Class1";

}
#endregion

/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Console.Write("Hello, World from Visual Studio");
String str = Console.ReadLine();
}
}
}

出现的问题如下:

“DefaultDomain”:已加载“c:\winnt\microsoft.net\framework\v1.0.3705\mscorlib.dll”,未加载符号。
“HelloWorldVS”:已加载“C:\Documents and Settings\Pastoral\My Documents\Visual Studio Projects\HelloWorldVS\bin\Debug\HelloWorldVS.exe”,符号已加载。
“HelloWorldVS.exe”:已加载“c:\winnt\assembly\gac\system.windows.forms\1.0.3300.0__b77a5c561934e089\system.windows.forms.dll”,未加载符号。
“HelloWorldVS.exe”:已加载“c:\winnt\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll”,未加载符号。
“HelloWorldVS.exe”:已加载“c:\winnt\assembly\gac\system.drawing\1.0.3300.0__b03f5f7f11d50a3a\system.drawing.dll”,未加载符号。
Hello, World from Visual Studio程序“[1144] HelloWorldVS.exe”已退出,返回值为 0 (0x0)。


请问怎么解决?
c:\winnt\assembly\gac\根本就没有,相应的程序都在c:\winnt\Microsoft.Net\Framework\v1.0.3705;下。怎么解决?
...全文
89 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
niwalker 2002-08-04
  • 打赏
  • 举报
回复
你怎么使用WinForm来进行Console输出呢?
请创建一个Console Application的Project;

或者:从工具栏向窗体拖放一个TextBox, 把Main中的Application.Run(...)的语句放回去,在

//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//

后面加上这个代码:textBox1.Text="Hello, World from Visual Studio";

编译运行,应该没有问题。
pursuer 2002-08-03
  • 打赏
  • 举报
回复
上面的只是调 试信息, 只要没有错误警告就可以了
pursuer 2002-08-03
  • 打赏
  • 举报
回复
这段代码编译时是出现这种信息的, 没错的

111,116

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧