简体   繁体   English

Visual Studio如何知道Project是VB项目或如何将项目转换为C#项目

[英]How does Visual Studio know Project is a VB project or How can I convert my project to C# project

I am looking to convert my project from a VB project into a C# project. 我希望将我的项目从VB项目转换为C#项目。 How do Visual studio recocgnize that the project is a VB project? Visual Studio如何识别该项目是VB项目? I have been looking through my project file in Notepad and I notice some of my old VB classes (they have been converted to C# by a useless utility). 我一直在记事本中浏览我的项目文件,并且注意到一些旧的VB类(它们已由无用的实用程序转换为C#)。 How can I change the actual Project and its files into C#? 如何将实际项目及其文件更改为C#?

Thanks 谢谢

(AFAIK) Visual Studio uses the file extension to know what sort of file it is .vbproj is a vb project file .vb is a vb source file, etc. (AFAIK)Visual Studio使用文件扩展名来知道它是哪种文件.vbproj是vb项目文件.vb是vb源文件,等等。

You can't just convert a project from one type to another, you will have to re-write each file individually but to get you most of the way there you can convert the code using an online converter: 您不仅可以将项目从一种类型转换为另一种类型,还必须分别重写每个文件,但是要充分利用这一点,您可以使用在线转换器转换代码:

http://www.carlosag.net/Tools/CodeTranslator/ http://www.carlosag.net/Tools/CodeTranslator/

http://converter.telerik.com/ http://converter.telerik.com/

http://www.developerfusion.com/tools/convert/csharp-to-vb/ http://www.developerfusion.com/tools/convert/csharp-to-vb/

Instant troll note: Why convert it at all? 即时巨魔笔记:为什么要完全转换它? VB is much better: https://www.simple-talk.com/dotnet/.net-framework/10-reasons-why-visual-basic-is-better-than-c/ VB更好: https : //www.simple-talk.com/dotnet/.net-framework/10-reasons-why-visual-basic-is-better-than-c/

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

相关问题 如何将VB5项目转换为ac #project - How do I convert VB5 project to a c# project 将VB项目转换为C#Visual Studio 2012 - Convert a VB project to C# Visual Studio 2012 如何将项目从 vb 转换为 c#? - How to convert project from vb to c#? 如何在我的 C# Visual Studio 项目中添加 VC++ DLL 作为参考? - How can I add a VC++ DLL as a reference in my C# Visual Studio project? 如何使用 C# 在 Visual Studio 上构建我的项目的 exe - how to build exe of my project on visual studio using c# 如何在我的 Visual Studio Code c# 项目中设置默认的 c# 文件? - How do I set the default c# file in my Visual Studio Code c# Project? 如何在Visual Studio C中创建“项目概述”# - How do I create a “Project overview” in Visual Studio C# 如何将dll项目设置整合到Visual Studio 2010中用于C#应用程序的主exe.config文件中? - How can I consolidate my dll project settings into my main exe.config file in Visual Studio 2010 for a C# application? 如何在我的Visual Studio 2012项目中引用XML文件作为项目代码中的数据源? - How can I reference an XML file in my Visual Studio 2012 project as a data source in my project code? 如何知道Visual Studio项目项是否是WebReference? - How to know if a Visual Studio project item is a WebReference?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM