简体   繁体   English

在 Visual Studio 2019 中找不到“开始操作”

[英]Can not find "Start Action" in Visual Studio 2019

I am a freshman at VS.我是VS的新生。

When I try to write a class library and find the debug configurations to change the "Start Action" but I can not find it.当我尝试编写一个 class 库并找到调试配置以更改“开始操作”但我找不到它时。

So, somebody can teach me how can I do to make it visible.所以,有人可以教我如何使它可见。

在此处输入图像描述

Thank you all so much非常感谢大家

You cannot start a class library because it is just a collection of functions.您不能启动 class 库,因为它只是一个函数集合。 There is no starting point for the compiler to find.编译器找不到起点。

Typically, to test a class library you would build a simple console application or even WinForms UI.通常,要测试 class 库,您将构建一个简单的控制台应用程序甚至 WinForms UI。 These projects have a main method that can actually be run, and they can call methods in your library.这些项目有一个真正可以运行的main方法,它们可以调用你库中的方法。

Just don't forget to add your library as a project reference.只是不要忘记将您的库添加为项目参考。 (Add -> Project Reference -> Library -> Ok) (添加 -> 项目参考 -> 库 -> 确定)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM