我可以强制Visual Studio对生产发布配置文件仅使用发布版本配置吗? [英] Can I force Visual Studio to use only a Release build configuration for my production publish profile?

查看:66
本文介绍了我可以强制Visual Studio对生产发布配置文件仅使用发布版本配置吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2010中为我的项目定义了两个发布配置文件:一个使用ftp进行生产,另一个使用ftp复制到我的本地文件系统中进行调试和日常开发.

I have two publish profiles defined for my project in Visual Studio 2010: one uses ftp for production and the other copies to my local file system for debugging and day to day development.

我有用于调试和发布构建配置的web.config转换.我的项目是一个Facebook应用程序,在其中根据部署情况设置应用程序ID和密码.

I have web.config transformations in place for debug and release build configurations. My project is a Facebook application where I set the application ID and secret depending on the deployment.

我希望能够执行一个规则,使得不可能将生产ftp发布配置文件与调试构建配置一起使用.这种结合将是灾难性的,并完全破坏了我的生产环境.

I would like to be able to enforce a rule such that it is impossible to use the production ftp publish profile with the debug build configuration. This combination would be disastrous and entirely break my production environment.

如何执行此规则?

我对替代部署方法持开放态度,但对我现在拥有的简单性感到非常满意,除了在推向生产时可能忽略构建配置的可能性之外.

I am open to alternative deployment methods, but am pretty happy with the simplicity of what I have now with the exception of the potential for overlooking the build configuration when pushing to production.

推荐答案

我已经接受了不可能的结论,因此显然答案是.... NO

I have come to accept the conclusion that it is not possible, so apparently the answer is....NO

这篇关于我可以强制Visual Studio对生产发布配置文件仅使用发布版本配置吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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