Changing the Output Path in your Web Applications is a bad idea
http://lnbogen.com/2006/09/20/changing-the-output-path-in-your-web-applications-is-a-bad-idea/
Let’s assume we have a WebSite(the same issue applied to WebService btw) named WebApplication1.
Now, we want to put its(the website’s) output files into some other directory (!= “bin” directory) for development reasons (working as part of a team with some sophisticated复杂的 Source Safe).
What’s the first thing you (and me) do? we use our “rational”合理的 programmer nature and Right-Click on the project->Properties->Build Tab->and changing the Output path to whatever we need.
(Instead of “bin\” we can write here “..\..\infrastructure” for example)
We then build the all thing and surprise surprise, the new output pathcontains all the dlls as expected. Awesome!
Satisfied with the greatness of Visual Studio .Net 2005, we now want to Publish the WebSite so we(or the QA) can play with it.
“Think as a developer, think as a developer” I say to myself and Right-Click the WebSite project->Publish… A few really easy “decisions” and ~10 seconds later, VS.NET tells(it speaks to me, I swear) me that my site was published successfully.
Happy as a little girl with a new puppy小狗, I enter my site:http://localhost/webapp1/Default.aspx and Oops哎哟!
The page can’t find its “code behind”(The class that it inherits from)! What the hack is going on here!?
Well, it turns out that the Publish process is not as smart as you may think it should be.
Changing our Output path to another directory (!= “bin”) caused this all mess as the Publish process simply copy all the files from the bin directory into the new(Published) bin directory.
No questions asked. The Publish algorithm do not check if you actually compile your dlls into another directory via Output path and taking it into account.
Fortunately for us, the solution is pretty easy: define your Output path into the original location (“bin\”) and use the Build Events(post-build in this scenario) in order to copy the output files into your “infrastructure”(or whatever) directory like this:
(The command: xcopy /Y /S ${TargetDir}*.* ..\..\Infrastructure)
May it save you the 15 minutes it took me and my teammate Hagay to solve this one.
Changing the Output Path in your Web Applications is a bad idea的更多相关文章
- [Windows Azure] Developing Multi-Tenant Web Applications with Windows Azure AD
Developing Multi-Tenant Web Applications with Windows Azure AD 2 out of 3 rated this helpful - Rate ...
- Changing the Output Voltage of a Switching Regulator on the Fly
http://www.powerguru.org/changing-the-output-voltage-of-a-switching-regulator-on-the-fly/ There are ...
- Developing RIA Web Applications with Oracle ADF
Developing RIA Web Applications with Oracle ADF Purpose This tutorial shows you how to build a ric ...
- Combining HTML5 Web Applications with OpenCV
The Web Dev Zone is brought to you by Stormpath—offering a pre-built Identity API for developers. Ea ...
- Can't remove netstandard folder from output path (.net standard)
https://developercommunity.visualstudio.com/content/problem/30940/cant-remove-netstandard-folder-fro ...
- Model-View-Controller(MVC) is an architectural pattern that frequently used in web applications. Which of the following statement(s) is(are) correct?
Model-View-Controller(MVC) is an architectural pattern that frequently used in web applications. Whi ...
- FindBugs:Compiler output path for module can not be null. check your module/project settings问题原因
这可能是很多人在使用Android studio 该插件会发现此错误信息:Compiler output path for module can not be null. check your mod ...
- Progressive Web Applications
Progressive Web Applications take advantage of new technologies to bring the best of mobile sites an ...
- Setting up Scatter for Web Applications
[Setting up Scatter for Web Applications] If you are still using scatter-js please move over to scat ...
随机推荐
- facade模式-服务-配置----系统生成与配置
facade模式对外提供一组相关服务: 对内整合子系统: facade模式的创建过程需要依赖外部的配置. 配置完成以后才能使用服务. 推广开来,所有系统都需要生成与配置,然后才能对外提供服务.
- vue基础---表单输入绑定
[一]基础用法 用 v-model 指令在表单 <input>.<textarea> 及 <select> 元素上创建双向数据绑定.它会根据控件类型自动选取正确的方 ...
- php利用32进制实现对id加密解密
前言 最近在项目中遇到一个问题,当前用户分享一个邀请码给好友,好友根据邀请码注册成为新用户之后,则成为当前用户的下级,特定条件下,可以得到下级用户的一系列返利.这里要实现的就是根据当前用户的id,生成 ...
- ubuntu下手动配置apache2.4.12
(apache2也可以使用 sudo apt-get install apache2来安装,下面来讲解下如何手动安装配置apache2) 在安装apache2之前,先要安装apache2的依赖项,ap ...
- 谈谈TCP中的TIME_WAIT
所以,本文也来凑个热闹,来谈谈TIME_WAIT. 为什么要有TIME_WAIT? TIME_WAIT是TCP主动关闭连接一方的一个状态,TCP断开连接的时序图如下: 当主动断开连接的一方(Initi ...
- Python数据分析与展示(1)-数据分析之表示(1)-NumPy库入门
Numpy库入门 从一个数据到一组数据 维度:一组数据的组织形式 一维数据:由对等关系的有序或无序数据构成,采用线性方式组织. 可用类型:对应列表.数组和集合 不同点: 列表:数据类型可以不同 数组: ...
- 【codeforces 3C】Tic-tac-toe
[链接] 我是链接,点我呀:) [题意] 题意 [题解] 写一个函数判断当前局面是否有人赢. 然后枚举上一个人的棋子下在哪个地方. 然后把他撤回 看看撤回前是不是没人赢然后没撤回之前是不是有人赢了. ...
- App后台开发运维和架构实践学习总结(3)——RestFul架构下API接口设计注意点
1. 争取相容性和统一性 这里就要求让API设计得是可预测的.按照这种方式写出所有接口和接口所需要的参数.现在就要确保命名是一致的,接口所需的参数顺序也是一致的.你现在应该有products,orde ...
- JRebel 7.1.5 插件下载 安装 激活 结合 IntelliJ IDEA--自动编译进行热部署---
Intellij IDEA 安装和配置jrebel进行项目的热部署 https://www.cnblogs.com/a8457013/p/7866625.html Intellij IDEA 使用jr ...
- 爬虫——使用ItemLoader维护item
在item的Filed()中设置参数函数,可以用来预处理item字段的数据,另一方面也方便程序代码的管理和重用 item中 from scrapy.loader.processors import M ...