views:

209

answers:

2

Hi,

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

A: 

Are you able to precompile the site using Visual Studio? Via the Build -> Publish Web Site menu?

Ian Oxley
I've not used that before, but yes I can.
ETFairfax
+1  A: 

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.

Bryan