Thursday, 11 April 2013

Visual Studio 2012 XML IntelliSense for URL Rewrite 2.0

I am working on a web-project within VS2012. I was trying to implement url-rewriting as described at cache busting in ASP.NET by Mads Kristensen. I was running into the problem that VS2012 didn't recognize the tag inside the .
I got it to work/function (thanks to ScottGu's blogpost) after installing the URL Rewrite Extension on IIS7.x.
So far so good, but VS2012 intellisense still didn't recognize the tag.
I searched around and found the post on RuslanY Blog. Unfortunately, the script didn't work on VS2012. Even changing a part of the code to var vs9CommonTools = shell.ExpandEnvironmentStrings( “%VS110COMNTOOLS%” );
However, a guy named Michal A. Valášek created an updated js script to get it to work on VS2012.
So I put the pieces together for your convenience, you can download it here (I called it rewrite2.1_vsintellisense). Note this script is just for VS2012! Just unpack the zip file, run the commandline window as administrator (elevated privileges), and execute the script file with cscript UpdateSchemaCache.js
Happy programming!


ni4i said...

Thanks, worked as perfectly :)

Rob said...

You're welcome, but all credits to the guys who created it. I just put it together. Happy programming!

paulshaver said...

That worked perfect. Thanks!

dirq said...

So awesome! Thanks for putting this together. I ran it with VS2012 closed and opened it up to no validation warnings on my web.config. And to intellisense! Thanks!

BTW, did you know you could shift+right-click and "open a command window here" to make it really easy to get in DOS at the folder? Then you just run cscript blahblah. Sweet!

Unknown said...

Perfect :-)

Tuco said...

Great! It worked flawlessly! :)

rondy007 said...

Super simple. Worked a treat. Thank you!

Bob said...

Thanks, I just installed that in Windows 8.1 Pro. The message showed up few times and I click run without..
and it runs just fine.

Jonas Spolander said...

Thanks a lot!

Independent Musings said...

Hi! Following your instructions, I'm trying to run UpdateSchemaCache (unblocked) from the elevated command prompt and I'm receiving an error "Failed to open file rewrite.xsd". The XSD is in the same folder as the js....can anybody offer any thoughts?