Visual Studio 2012 says "Unable to edit" when you include a remote CSS file

I have included CDN in bootstrap CSS in my project. Everything works absolutely fine except when I print

<div class="

Visual Studio then gives an error message:

Unable to edit ' http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css '. here `the stylesheet should be part of the current project, and the project should be a website or web application project

I can click OK to reject these errors, and then everything works fine - it reads CSS classes and fills Intellisense and works correctly when created. But why is Visual Studio trying to edit a remote CSS file? How can I say this is not so?

+3
source share
1 answer

I had the same problem and a little search led me to the following page:

http://forums.asp.net/t/1586914.aspx?Unable+to+edit+CSS+file+

In short: add a fake parameter to the end of your CDN URL to get rid of your errors. It also makes intellisense work correctly.

Example:

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css?parameter=1" rel="stylesheet">
+4
source

All Articles