I know this can be done with mvc2, but is there any way for visual studio(2010)/resharper(6) to check for errors on aspx pages at compile time and halt the build? Resharper can detect the errors just fine, so it seems like there should be a way to integrate a check of all the aspx pages in to the build process.
Any tips?
aspx. cs file) must first be compiled. This compilation can happen explicitly or automatically. If the compilation happens explicitly then the entire application's source code is compiled into one or more assemblies ( .
aspx. cs code is run server side, while the . aspx file is compiled on the server and is then served to the web client requesting it. Additionally, for MVC, I would suggest using a different view model, specifically Razor, which uses .
If you use code-behind class files with . aspx pages, you can separate the presentation code from the core application logic (or code-behind). The code-behind class file is compiled so that it can be created and used as an object. This allows access to its properties, its methods, and its event handlers.
Yes you can. The following steps will cause .aspx files to be compiled as part of a normal builk invoked by the IDE, no Resharper plugin required.
<Target Name="AfterBuild"><AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" /></Target>
Source - Compile Aspx pages at compile time using the AspNetCompiler build task
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With