简体   繁体   中英

Generate DLL from C# Project using windows command line

I have a C# project with structure of src/test/API and src/test/Client. I have bunch of .cs files under those folders. I want to generate a single DLL from this project. How would i accomplish this? I want to use windows command prompt for this if possible. Below is the screenshot of the folder structure

在此处输入图片说明

The answer depends whether you're targeting .NET Framework or .NET Core:

  • If you're targeting .NET core then navigating to the root directory of your folder and doing a dotnet build (link for more info) should generate a DLL for your project in the bin sub-directory of your project.
  • If your project targets .NET Framework then you'd need to run MSBuild from the root directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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