Trying to open a CSS file in Visual Studio 2010 shows error ‘The operation could not be completed. Unspecified error.’
WHAT IS CSS?
A cascading style sheet (CSS) contains style rules that are applied to elements in a Web page. CSS styles define how elements are displayed and where they are positioned on the page. Instead of assigning attributes to each element on your page individually, you can create a general rule that applies attributes whenever a Web browser encounters an instance of an element or an element that is assigned to a certain style class.
All OS versions supporting VS2010
SYMPTOM AND INFERENCE:
Trying to open a CSS file from an existing project may can throw up the below error.
What might add to the confusion is that the same instance of Visual Studio 2010 may be able to open certain CSS files, and show the above error for others!
The underlying cause is that while you may have installed the service pack, and installed all the required updates, Visual Studio still does not support CSS above version 2.1. This is evident from the below dropdown-
The resolution is to add the supportability for CSS version 3 as below-
1. Launch Visual Studio 2010
2. Click on ‘Tools’
3. Click on ‘Extension Manager…’
4. Under ‘Online Gallery’ search for
"Web Standards Update for Microsoft Visual Studio 2010 sp1"
5. Download the update
6. Exit from Visual Studio 2010
7. Re-launch Visual Studio 2010
Further once this is done you can also notice the addition of the next version in the dropdown as illustrated below-
MORE ON CSS3!
Content By: Ritwik Sinha