I'm publishing an ASP.Net MVC as an IIS7 site on my local workstation. Is it possible to get IIS7 to re-compile the project when needed?
我在我的本地工作站上发布了一个ASP.Net MVC作为IIS7站点。是否有可能让IIS7在需要时重新编译项目?
2 个解决方案
#1
No, IIS7 can't do that. There's a bunch of alternatives, I think from easiest to more complicated:
不,IIS7无法做到这一点。有很多选择,我认为从最简单到更复杂:
- As mentioned: Just use Visual Studio to develop and test by hitting F5 and using VS.net built-in web server for asp.net
- Point your IIS web site to where your site code is. When you compile your project the IIS web site should also be compiled since it's pointing to the same code as you development files. This is similar to what you are doing but there is no need to actually publish the site.
- Use something like CruiseControl.net and nant to automatically compile and deploy your project to IIS at intervals or as needed.
如上所述:只需使用Visual Studio通过点击F5并使用VS.net内置的web.net服务器来开发和测试
将IIS网站指向您的站点代码所在的位置。编译项目时,还应编译IIS网站,因为它指向与开发文件相同的代码。这与您正在进行的操作类似,但不需要实际发布该站点。
使用类似CruiseControl.net和nant的东西,可以按时间间隔或根据需要自动编译和部署项目到IIS。
#2
Files published to IIS shouldn't be source code that needs to be re-compiled.
发布到IIS的文件不应该是需要重新编译的源代码。
You could search for "automated build process", "continuous integration" or MSBuild if you want to set up a system that re-compiles and then publishes your site for you whenever you change the source code.
如果您想要设置一个系统,可以在您更改源代码时重新编译并随后为您发布站点,则可以搜索“自动构建过程”,“持续集成”或MSBuild。
#1
No, IIS7 can't do that. There's a bunch of alternatives, I think from easiest to more complicated:
不,IIS7无法做到这一点。有很多选择,我认为从最简单到更复杂:
- As mentioned: Just use Visual Studio to develop and test by hitting F5 and using VS.net built-in web server for asp.net
- Point your IIS web site to where your site code is. When you compile your project the IIS web site should also be compiled since it's pointing to the same code as you development files. This is similar to what you are doing but there is no need to actually publish the site.
- Use something like CruiseControl.net and nant to automatically compile and deploy your project to IIS at intervals or as needed.
如上所述:只需使用Visual Studio通过点击F5并使用VS.net内置的web.net服务器来开发和测试
将IIS网站指向您的站点代码所在的位置。编译项目时,还应编译IIS网站,因为它指向与开发文件相同的代码。这与您正在进行的操作类似,但不需要实际发布该站点。
使用类似CruiseControl.net和nant的东西,可以按时间间隔或根据需要自动编译和部署项目到IIS。
#2
Files published to IIS shouldn't be source code that needs to be re-compiled.
发布到IIS的文件不应该是需要重新编译的源代码。
You could search for "automated build process", "continuous integration" or MSBuild if you want to set up a system that re-compiles and then publishes your site for you whenever you change the source code.
如果您想要设置一个系统,可以在您更改源代码时重新编译并随后为您发布站点,则可以搜索“自动构建过程”,“持续集成”或MSBuild。