Afterlooking at this [post][1], I thought that I would give it a go.
So, in my Post Build Event, I've put...
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler -v / -p "$(ProjectDir)\"
...then clicked Build Solution.
开发者_如何转开发Unfortunately, I got the following error: "Could not load type 'MyWebProject.UI.Global'. C:\global.asax 1 MyWebProject.UI"
Any ideas why? To my knowledge, I don't even have a C:\global.asax file.
Ultimately, I want to be able to check my ASPX pages for errors. At the moment, the only way in which I can do this is by navigating to the page.
Any other suggestions/approaches welcome!
Thanks,
ETFairfax
http://mikehadlow.blogspot.com/2008/05/compiling-aspx-templates-using.html
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p "website complete path" d:\testPrecompileFolder -f
Your post build event is pointless. If you can precompile, then you don't have any errors that aspnet_compiler would catch anyway. Runtime errors are another matter of course.
Are you able to precompile the site using Visual Studio? Via the Build -> Publish Web Site menu?
精彩评论