【发布时间】:2018-09-07 22:57:09
【问题描述】:
所以我需要为一个 C# 项目(ashx 页面)创建一个 Angular 构建 (ng build --prod --aot-false),并将 Angular 文件夹作为项目的一部分。
我现在尝试的是在“src”文件夹外的 Angular 文件夹中创建一个 bat 文件,如下所示:
test.bat:
mkdir a
ng build --prod --aot=false
mkdir b
当我执行命令时,目录“a”和“b”会立即创建,但从未构建过。
执行我使用的过程:
文件处理程序.ashx:
System.Environment.CurrentDirectory =
context.Server.MapPath("~/ZipFiles/AngularProject_test/AngularProject/");
System.Diagnostics.Process.Start("test.bat");
【问题讨论】: