How can I compile changes in only 1 document but keep the original build of the others? (C#, Asp.Net MVC)
I have a local install and a live install. My live install is working except I cha开发者_运维问答nged one of the methods to be restricted via [Authorize(Roles = "Admin, Host")]
I want to remove this, but I need to do a build of the solution and move the .dll over for it to work (correct me if I'm wrong).
I cannot build the solution because my local install has changes to all of the files and will not build properly. All I want to do it update that one controller/page to allow access... is there any way of doing that?
What you need is branches (you are using Source Control, aren't you?)
Basically, what you do is have one branch where you do development, and another "stable" branch, where you only do small fixes to the code that is in production.
Once you deploy to production, you "merge" from the dev branch to the stable branch.
If you are not using Source Control, just have 2 copies of the code for now, and do the same kinds of things.
And learn to use Source Control, your life will change dramatically.
THis may not help you this time, but it sounds like a perfect example of what source code control systems are for. Tools like cvs, git, ClearCase, subversion and so on let you maintain a database of code and changes to it. Then when you make a release, or "live install", or deploy to a production server, you can make a snapshot of the code at that point. Then when you need to fix something urgently in the production version without a full release cycle, you can check out a copy of the code that is running "live", and fix it, without messing up the copy you're hacking on for the next great feature.
精彩评论