我刚刚进入编程,我已经重新安装了一次Visual Studio 2015,因为每次创建模板项目时都会崩溃并单击主函数行。当我创建一个空项目时,一旦我键入{} brakets,它就会崩溃。
它也不会创建一个c#项目文件。它只是说"创建项目x"永远。
是什么导致这种情况?
这两次安装花了大约4个小时对我来说很奇怪。这是正常的吗?感谢您的帮助!
答案 0 :(得分:0)
由于您没有说要尝试创建哪个模板项目,请尝试创建控制台应用程序项目: 档案 - >新 - >项目
它将创建以下起始代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
}
}
}
只需将以下行添加到Main函数中即可运行。
Console.WriteLine("Hello World!");
Console.ReadKey();
希望你完成这项工作,如果没有,可能有很多原因导致你的Visual Studio以这种方式崩溃,请分享更多信息/截图,如果你不能这样做,最重要的是,你正在尝试哪个模板使用。