简体   繁体   English

从cmd创建,添加文件并运行Visual Studio项目

[英]creating, adding files and run a visual studio project from cmd

I have a main program (python) that will create ac# unit test code. 我有一个主程序(python),它将创建ac#单元测试代码。 I need to run this code, for which I need to create a new unit test project, add the created code into the project and then run it. 我需要运行此代码,为此我需要创建一个新的单元测试项目,将创建的代码添加到项目中,然后运行它。 I need to perform all these actions from within the main program itself. 我需要从主程序本身执行所有这些操作。 Is there any way to do these from the program? 有什么办法可以从程序中执行这些操作吗? I mean either running some steps in cmd or using some api? 我的意思是要么在cmd中运行某些步骤,要么使用一些api? Thanks for the help! 谢谢您的帮助!

this may help you create a new .csproj file How to create csproj command line? 这可以帮助您创建新的.csproj文件。 如何创建csproj命令行? then add your code files into the project directory,and add text like following in .csproj file 然后将您的代码文件添加到项目目录中,并在.csproj文件中添加如下所示的文本

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

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