如何使用 dotnet-cli 将新的 c# 文件添加到项目中 [英] how to add a new c# file to a project using dotnet-cli

查看:26
本文介绍了如何使用 dotnet-cli 将新的 c# 文件添加到项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习如何在 VSCode 中使用 dotnet-cli.我已经看到许多关于如何创建解决方案、项目、添加对项目的引用的命令......但我在文档中没有看到如何添加文件的任何地方.如果还记得,在 RubyOnRails 中,可以从命令行添加文件.

I'm learning how to use dotnet-cli with VSCode. I've seen many commands on how to create solution, projects, add reference to projects... but I don't see anywhere in the documentation how to add a file. If remember, in RubyOnRails it was possible to add file from the command line.

感谢您的帮助

推荐答案

我不知道(我也在研究那个主题)但我发现了 jchannon 对 VS 代码有用的扩展,称为 C# 扩展,它可以帮助您创建类和通过在 VS 代码资源管理器中右键单击文件夹并选择创建 C# 类或 C# 接口,可以使用正确的命名空间接口.

Not that I know of (I was also researching that topic) but I found helpful extension for VS code called C# Extensions by jchannon, which helps you create classes and interfaces with correct namespace by right-clicking the folder in VS code explorer and selecting to create C# class or C# interface.

这篇关于如何使用 dotnet-cli 将新的 c# 文件添加到项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆