我的网络应用程序的几种不同环境(例如实时、演示等)通过名为EnvironmentConfiguration 的文件夹中的配置设置来区分。每当我更新其中一个站点时,我都会在复制网站文件之前从预编译站点中删除EnvironmentConfiguration文件夹(即为了不替换部署位置中的EnvironmentConfiguration文件夹)。
为了避免错误,有没有办法让 Visual Studio 在为我预编译站点时不生成 EnvironmentConfiguration 文件夹?
The several different environments (e.g. live, demo etc) of my web app are differentiated by config settings in a folder called EnvironmentConfiguration. Whenever I update one of the sites, I delete the EnvironmentConfiguration folder from the precompiled site before copying the website files over (i.e. in order that the EnvironmentConfiguration folder in the deployment location is not replaced).
Just to save mistakes, is there a way I can get Visual Studio not to produce the EnvironmentConfiguration folder when it precompiles the site for me?
发布评论
评论(1)
你可以尝试几件事。
1) 右键单击解决方案中的文件夹,然后选择从项目中排除。
2) 查看文件夹中的每个文件并将 BuildAction 属性设置为“None”而不是“Content”
You could try a couple of things.
1) Right click on the folder in the solution and select exclude from Project.
2) Look at each of the files in the folder and set the BuildAction property to 'None' rather than 'Content'