I have included the CDN of the bootstrap CSS in my project. Everything works absolutely fine, except when I type
<div class="
Then Visual Studio pops up an error saying:
Unable to edit 'http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css'. here`The style sheet must be part of the current project and the project must be a Web Site or Web Application project
I can hit OK to dismiss these errors, and then everything works fine as well - it reads the CSS classes and populates Intellisense and works correctly when I build. But why is Visual Studio trying to edit the remote CSS file? How can I tell it not to?
I was having the same problem and a little search brought me to the following page:
http://forums.asp.net/t/1586914.aspx?Unable+to+edit+CSS+file+
In a nutshell: Add a fake parameter to the end of your CDN URL to get rid of your errors. This also makes intellisense work correctly.
Example:
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css?parameter=1" rel="stylesheet">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With