当我尝试在 VScode 中创建新的 C# 项目时,出现错误。我该如何修复它?
\n\n这是我的命令:
\n\nPS C:\\Users\\lau\\Documents\\code\\c#> dotnet new console
这是错误消息\xef\xbc\x9a
\n\n\n\n无法创建模板“控制台应用程序”。\n 处理文件时出错\n /content/ConsoleApplication-CSharp/Company.ConsoleApplication1.csproj\n System.IO.FileNotFoundException: 找不到文件\n \'C:\\Users\\lau\\Documents\\code \\c#\\c#.csproj\'。文件名:\n \'C:\\Users\\lau\\Documents\\code\\c#\\c#.csproj\' at\n System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)\n at System. IO.FileStream.CreateFileOpenHandle(FileMode 模式、FileShare\n 共享、FileOptions 选项)at\n System.IO.FileStream..ctor(字符串路径、FileMode 模式、FileAccess\n 访问、FileShare 共享、Int32 bufferSize、FileOptions 选项)\ n at System.IO.FileStream..ctor(字符串路径、FileMode 模式、FileAccess\n 访问、FileShare 共享、Int32 bufferSize)at\n System.IO.File.Create(字符串路径)at\n Microsoft.TemplateEngine.Utils .PhysicalFileSystem.CreateFile(String\n 路径) at\n Microsoft.TemplateEngine.Core.Util.Orchestrator.ProcessFile(IFile\n sourceFile, String sourceRel, String targetDir, IGlobalRunSpec 规范,\n IProcessor 后备, IEnumerable
\n1 fileGlobProcessors, IReadOnlyList1\n locOperations)