JQuery Visual Studio documentation only on Debug

I’ve included my scripts using a dynamic method that means Visual Studio can’t determine what scripts are available to a given page.

This removed the code completion for scripts, and I found the code completion helpful especially as I am learning JQuery and also due to the fact that you can never remember everything 🙂 I also wanted to prevent the script loading when

To get around this issue I’ve included the scripts like this

<% #if DEBUG %>
<!-- Load VS JQuery documentation if in debug mode! -->
<script src="../../Scripts/jquery-1.3.2-vsdoc.js" type="text/javascript"></script>
<% #endif %>

Which ensures that the Script include is only included in DEBUG builds… this means that when I would go to production that script would not be included in the page…

This doesn’t seem (at the moment) to cause issues with the real registration of JQuery… It’s not the most perfect, but it’s a safeguard  against me forgetting 🙂

Update: It’s actually not being found at runtime… So maybe that is why it is not causing issues 🙂


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: