gpt4 book ai didi

c# - 无法在 VS Code 终端中创建 C# 控制台应用程序

转载 作者:行者123 更新时间:2023-12-04 13:38:05 24 4
gpt4 key购买 nike

当我尝试在 VScode 中创建一个新的 C# 项目时,出现错误。我该如何解决?

这是我的命令:
PS C:\Users\lau\Documents\code\c#> dotnet new console
这是错误信息:

Template "Console Application" could not be created. Error while processing file /content/ConsoleApplication-CSharp/Company.ConsoleApplication1.csproj System.IO.FileNotFoundException: Could not find file 'C:\Users\lau\Documents\code\c#\c#.csproj'. File name: 'C:\Users\lau\Documents\code\c#\c#.csproj' at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.IO.File.Create(String path) at Microsoft.TemplateEngine.Utils.PhysicalFileSystem.CreateFile(String path) at Microsoft.TemplateEngine.Core.Util.Orchestrator.ProcessFile(IFile sourceFile, String sourceRel, String targetDir, IGlobalRunSpec spec, IProcessor fallback, IEnumerable1 fileGlobProcessors, IReadOnlyList1 locOperations)

最佳答案

我遇到了同样的问题,我以管理员身份打开命令提示符控制台修复了我的问题

关于c# - 无法在 VS Code 终端中创建 C# 控制台应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60667759/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com