c#中process的操作【MSbuild生成DLL】
【1】CMD用法:https://blog.csdn.net/weixin_44548405/article/details/126470653【2】(1条消息) 从零开始构建MSBuild C#项目文件_fhuan123的博客-CSDN博客
【3】CMD用法:(1条消息) MSBuild 强在功能 (C#调用 命令行工具)_weixin_30530339的博客-CSDN博客
【4】编译路径说明:c# - 第一次使用msbuild - IT工具网 (coder.work)
MSBuild my.csproj /p:OutputPath=bin\Debug\
MSBuild my.csproj /p:Configuration=Release /p: Platform=x86
string CSharpProj = newProjPath + @"/" + DLLName + ".sln";
//
string MSBuildStr = System.Windows.Forms.Application.StartupPath + @"/" + "Bin" + @"/" + "MSBuild.exe";
//string MSBuildStr = @"D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin" + @"/" + "MSBuild.exe";
string MSBuildDebug = "Release";
string MSBuildPlatform = "x64";
//string cmdStr = MSBuildStr + " " + CSharpProj + " " + "-p:Configuration = " + MSBuildDebug + " " + "-p:Platform = " + MSBuildPlatform;
string cmdStr = MSBuildStr + " " + CSharpProj + " " + "/t:Rebuild /p:Configuration = " + MSBuildDebug + " " + "/p:Platform = " + MSBuildPlatform;
页:
[1]