If this has been asked before, I apologize.
If I had a currently deployed ASP.Net C# website which had a slight bug or modification needed in a cs file, would it be possible to modify the cs file and have IIS recompile the ASP.Net website rather than using Visual Studio or SharpDevelop to rebuild the site?
I’m familiar with PHP websites where a change is compiled automatically. Is there a way to get ASP.Net or IIS to do something similar to the code-behind files of an ASP.Net website?
I understand that modifying the web.config file may force a recompile, and modifying the ASPx files automatically displays the changes, but I haven’t found the same success in the code behind files.
Thank you.
Edit (Answer below):
The command to recompile an existing ASP.Net website using existing sources (including the solution file) is this:
%windir%\microsoft.net\framework\v4.0.30319\msbuild /m Solution.sln /p:Configuration=Debug
@IF %ERRORLEVEL% NEQ 0 GOTO err
@exit /B 0
:err
@PAUSE
@exit /B 1
Paste the above code into a batch file within your solution directory. Change the Solution.sln to your solution file, modify the framework to match your installed version. You can change the Configuration option to “Release” as well.
* Batch file code used from SharpDevelop source code. Idea based on this forum post: http://community.sharpdevelop.net/forums/t/8281.aspx
The command to recompile an existing ASP.Net website using existing sources (including the solution file) is this:
Paste the above code into a batch file within your solution directory. Change the Solution.sln to your solution file, modify the framework to match your installed version. You can change the Configuration option to “Release” as well.
* Batch file code used from SharpDevelop source code. Idea based on this forum post: http://community.sharpdevelop.net/forums/t/8281.aspx