ASP.NET的Web.config转型将不会安装工作 [英] ASP.NET Web.config transformation won't work in installer

查看:130
本文介绍了ASP.NET的Web.config转型将不会安装工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作在Visual Studio .NET 2010 ASP.NET项目,并试图使使用Web安装项目的MSI安装程序。我说从项目(这似乎在有关依赖拉)主输出,并从项目(拉在Web.config和.SVC文件)的内容文件中。

I am working on an ASP.NET project in Visual Studio .NET 2010 and attempting to make an MSI installer using a Web Setup Project. I added the Primary output from the project (which seems to pull in the relevant dependencies) and the Content Files from the project (which pulls in the Web.config and the .svc files).

问题是,而不是应用XDT转换和创建使用Web.Release.config的Web.config,它只是复制Web.config文件中,Web.Release.config和Web.Debug.config成安装程序没有做任何改造的。

The issue is that rather than applying the XDT transform and creating the Web.config using the Web.Release.config, it just copies the Web.config, the Web.Release.config, and the Web.Debug.config into the installer without doing any transformation at all.

我如何得到它创建安装程序前申请的Web.config转型?

How do I get it to apply the Web.config transformation before creating the installer?

推荐答案

答案最终被位于另一个SO后,我错过了,当我问之前搜索过,因为它不是正是我想要的:

The answer ended up being located on another SO post which I missed when I was searching through before asking because it wasn't exactly what I wanted:

<一个href=\"http://stackoverflow.com/questions/2905151/msbuild-script-and-vs2010-publish-apply-web-config-transform/2970138#2970138\">http://stackoverflow.com/questions/2905151/msbuild-script-and-vs2010-publish-apply-web-config-transform/2970138#2970138

使用放置在项目的斌转化的Web.config一位同事建议目录,并配置抢在Web.config出了一个Web安装项目bin目录,然后把它放在安装程序。这最终成为最可行的解决方案,无需安装任何附加组件到Visual Studio。

A co-worker suggested using that to place the transformed Web.config in the project's bin directory and a Web Setup Project configured to grab the Web.config out of the bin directory and put it in the installer. This ended up being the most workable solution without installing any add-ons into Visual Studio.

这篇关于ASP.NET的Web.config转型将不会安装工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆