c# - 我应该将什么指定为 ClientBuildManager 构造函数的 "target folder"参数?

标签 c# asp.net .net iis pre-compilation

我想尝试一下 ClientBuildManager class constructor 的第四个参数这让我可以指定编译选项。问题是我必须提供指定“目标文件夹”的第三个参数。

之前我使用过 two-paremeters constructor像这样:

VirtualDirectory dir = ...;
using( var buildManager = new ClientBuildManager( dir.Path, dir.PhysicalPath ) ) {
     buildManager.PrecompileApplication();
}

效果很好 - 这两个参数非常明显。

我不知道从哪里获取第三个“目标文件夹”参数。

如何获取可以作为第三个“目标文件夹”参数传递的值,以便预编译像以前一样工作?

最佳答案

如果您只想"Compiling an Application in Place",则可以为TargetFolder传递null 。如果您为 TargetFolder 传递一个有效的文件夹,您将是 "Compiling an Application for Deployment" .

关于c# - 我应该将什么指定为 ClientBuildManager 构造函数的 "target folder"参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10830044/

相关文章:

asp.net - 如何在 Twitter 等网站上接收和发布短信?

c# - 如何在 .config 文件中指定相对于文件的路径?

c# - 多线程UI,无法BeginInvoke

c# - 在单例上使用 Dispose 来清理资源

c# - C# 8.0 默认接口(interface)成员的意外行为

c# - 将 jquery 引用移动到 asp.net 母版页时出现 java 脚本错误

c# - 在 Visual Studio 2010 中自动生成 sql 存储翻译

asp.net - 谁打算回到使用 ASP.NET 4.0 中的 Web 应用程序?

.net - 两个被同一个对象锁定的 SyncLocked 代码块可以同时执行吗?

.net - 列表泛型 - 隐式转换