【发布时间】:2021-08-15 18:33:16
【问题描述】:
所以我是 C# 和 Vs Studio 的新手。我通过添加新课程和测试我能做什么来学习它。但是,今天似乎无论我做什么,当我创建一个新类时,它都不会链接到主文件。
例如,我将转到顶部的工具栏并导航到Project -> Add New Item -> Visual C# Class
我注意到我不再像以前那样在此窗口中选择命名文件
我目前有工作类,从我上次这样做并尝试在项目中创建一个新文件并在更改类名称时复制/粘贴所有代码,仍然没有工作。
不知道发生了什么,因为我按照 YouTube 教程点击点击,但它仍然不起作用。
以下是我的 VS 工作室的统计数据,自从我上次使用它和上次使用它以来我没有改变,创建一个 c# 类没有这些问题。
Microsoft Visual Studio Community 2019
Version 16.9.4
VisualStudio.16.Release/16.9.4+31205.134
Microsoft .NET Framework
Version 4.8.04084
Installed Version: Community
ASP.NET and Web Tools 2019 16.9.693.2781
ASP.NET and Web Tools 2019
Azure App Service Tools v3.0.0 16.9.693.2781
Azure App Service Tools v3.0.0
C# Tools 3.9.0-6.21160.10+59eedc33d35754759994155ea2f4e1012a9951e3
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
NuGet Package Manager 5.9.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
TypeScript Tools 16.0.30201.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 3.9.0-6.21160.10+59eedc33d35754759994155ea2f4e1012a9951e3
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 16.9.0-beta.21102.9+7ce7132f1459095e635194d09d6f73265352029a
Microsoft Visual F# Tools
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
【问题讨论】:
-
尝试修复VS或重新安装它...或重新启动你的电脑:)
-
好的,我现在要做演示,我将重新启动而不是重新安装并让你知道。谢谢顺便说一句
标签: c# asp.net .net visual-studio