3

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

3 Answers 3

1

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

1

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.

0

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

1
  • I've not used that before, but yes I can.
    – ETFairfax
    Dec 2, 2009 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.