Web.Release.Config不起作用 [英] Web.Release.Config does not work

查看:157
本文介绍了Web.Release.Config不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个刚接手的网站,并且想要使网络转换正常工作.我在MVC项目中进行调试和发布一直很成功,但是这个ASP网页应用程序拒绝合作.

I have a web site I just took over and am wanting to get web transformations working. I have always had success with MVC projects doing this for debug and release but this ASP web pages application refuses to cooperate.

很抱歉,如果这是重复的.我看到了很多类似的问题,但是还没有任何问题解决我的问题.

I apologize if this is a duplicate. I see a lot of questions like this but nothing has solved my issue yet.

如果按F5并运行,我将按预期获得web.config设置. 如果发布测试"配置文件(调试模式),则将按预期方式进行web.Test.Config转换. 如果发布发布"配置文件,我将获得相同的web.Test.Config转换,而不是发布版本.

If I press F5 and run, I get web.config settings as I expect. If I publish my "Test" profile (debug mode) I get web.Test.Config transformations as expected. If I publish my "Release" profile I get the same web.Test.Config transformations and NOT the release one.

可能引起关注的问题或事物:

Possible issues or things that may be of interest:

web.config文件在解决方案中展开以显示调试文件.该发行文件不属于此文件,并且在下面单独列出.

The web.config file expands in the solution to show the debug file. The release file is not part of this and is listed separately below.

我尝试在主web.config中将调试的编译设置更改为false.这没有效果.

I tried changing the compilation setting for debug to false in the main web.config. This had no effect.

在SLN文件中,我注意到在GlobalSection中有用于postSolution的行,其中列出了我的项目GUID,后跟.Debug或.Release.这些都最后都说"Debug | Any CPU".我将发布版本更改为"Release | Any CPU".我重新发布了,但VS刚刚将其更改为对我调试".

In the SLN file I noticed that I have lines in the GlobalSection for postSolution that list my project GUID followed by .Debug or .Release. BOTH of these say "Debug|Any CPU" at the end. I changed the release ones to say "Release|Any CPU". I republished but VS just changed this back to Debug on me.

在Build-> Configuration Manager中,我选择Release作为Active soltion配置.在项目上下文"框中,我的应用程序在配置"列下拉列表中只有调试"可用.

In Build -> Configuration Manager, I select Release as thje Active soltion configuration. In the Project contexts box, my application only has Debug available in the Configuration column drop down.

我注意到在website.publishproj中没有发布部分.有一个PropertyGroup,其配置为Debug,仅此而已.由于变得愚蠢或愚蠢,我忽略了请勿修改此文件"消息,并添加了发布部分.这没有效果.

I noticed that in website.publishproj there was no section for Release. There was a PropertyGroup with configuration of Debug but that's all. Being cavalier or stupid I ignored the "do not modify this file" message and added the release section. This had no effect.

粘贴照片.下拉列表被展开.

Photo pasted in. The dropdown is expanded.

推荐答案

突出显示的下拉列表是您需要在以下位置添加配置的地方:

The highlighted dropdown is where you would need to add the configuration back in:

这篇关于Web.Release.Config不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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