I was just wondering if there is a fix for the following validation errors.
Validation (CSS 3.0): text-shadow is not a known CSS property name.
Validation (CSS 3.0): text-overflow is not a known CSS property name.
Validation (CSS 3.0): none is not a valid value for the max-height property.
Validation (CSS 3.0): rotate(180deg) is not a valid value for the -webkit-transform property
Now here is the funny part, when I switch it to the CSS 2.1 Validation, I do get a bunch of other warnings about invalid properties( which are css 3.0 properties), but then I don't get these errors: 'none' is not a valid value for the max-height property and rotate(180deg) is not a valid value for the -webkit-transform.
I've installed SP1 and the css3 schema, checked the registry, and everything is how it's supposed to be. I've checked many answers here. Some of them suggest to uncheck 'Detect unknown properties', 'Detect invalid values', or uncheck 'Detect errors', but that's not what I was looking for. Any suggestions?
If you install the Web Standards Update for Microsoft Visual Studio 2010 SP1 and then the CSS 3 Intellisense Schema that should do the trick.
The first one apparently is missing some of the specifications.
Good Luck. Let me know if that worked for you.
Did you install the Web Standards Update for SP1?
To manually add any missing CSS selector properties, you can also manually edit the syntax file, on my system (Visual Web Developer 2010) the file was located at:
C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\1033\schemas\CSS\css30.xml
Search for the selector that is giving you a false error.
Tip: make a backup of the original first.
Related
ReSharper TypeScript seems to be not working at all in my VS 2015 installation. Despite of the correctly placed TypeScript definitions ReSharper does not recognize the defined types, gives zillion red underlines, and of course intellisense does not work on the variables.
The error message is for example: Could not find symbol 'JQuery'
Some more diagnostics:
Compiling the project in VS 2015 compiles with no error. Making an intentional error in the source then build generates one correct error message
Intentionally making a spell in the type definition file paths, it underlined with red correctly. When correcting the path, underline diasppears
Opening the very same project in VS 2013 all works like a charm, ReSharper is working correctly
Originally used ReSharper 9.1.2 this issue was there. Now upgraded to the latest 9.1.3 and the issue remained.
Any ideas?
If you see this kind of behaviour - lots of red, but clean compile, especially after an upgrade - you should try to clean the caches. Go to ReSharper → Options → General → Clean caches, then restart Visual Studio.
Since the problem occurs in more than one version including latest as of writing, you also have the option to switch off TypeScript support in ReSharper. After all, if a feature is broken, why use it?
How to switch it off according to their web site:
If necessary, you can disable/enable ReSharper features in TypeScript
files by clearing the corresponding check box on the Environment |
Products & Feature page of ReSharper options.
Source: JetBrains help page for ReSharper (retrieved 29 March 2018)
After this change you may have to restart Visual Studio for the new settings to take effect.
I have found that sometimes, the Visual Studio Project file is corrupted, containing multiple references to .ts files. This can cause a different, but related error, where ReSharper thinks there are multiple declarations of a symbol.
To resolve, if you are using version control, it is simple.
Make a commit
Delete the folder containing the duplicated files
Revert changes to the repository
Add the folder back to Visual Studio
Save the project file
As I mentioned, this doesn't solve the original problem, but can help in situations where ReSharper reports duplicate symbols.
In a MVC4, razor view, I am unable to get HTML5 intellisense.
After adding AngularJS references to VS2012 for intellisense, I still wasn't getting the any of the AngularJS directives to appear.
I have the HTML5 schema enabled (Tools/Options/Text Editor/HTML).
I also don't see any of the HTML5 intellisense as shown here.
When I type the
<
Intellisense is "text".
Other tags show a green line with the message "Validation ($SCHEMA$): Element 'script' is not supported.
Looks like there's a disconnect somewhere with my schemas.
I also tried added the target schema for validation to the toolbar and received the error:
---------------------------
Microsoft Visual Studio
---------------------------
Could not complete the action.
---------------------------
OK
---------------------------
How can I resolve this?
I have had exactly the same problem with VS 2013. I had been messing about with the schemas used for validation, so I reckoned that was the problem, turns out I had likely corrupted one of the files.
Find a "healthy" install of VS 2012 (maybe install on another machine?), zip & copy the following directory:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\schemas\html
Delete the directory from the "unhealthy" VS and copy the "healthy" one into it's place. Then re-start VS.
For 2013, you may also need to do the same for the following directory:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\Web\Schemas\1033\HTML
Prior to this I had also done a "Devenv.exe /Setup" and "Devenv.exe /ResetSettings", but I don't think these are necessary.
In Visual Studio 2010, in my view (cshtml), sometimes I have some code not accepted. Here is a concrete example:
I know this is not a real problem. I wonder if I can "edit" the rules of VS to stop telling me there is a problem for this 'nowrap'. I don't want to desactivate all the warnings.
Thanks.
You could get around this particular warning by using a CSS rule.
td {white-space:nowrap}
http://jsfiddle.net/3rwWh/4/
I am experimenting with Less Css, and I am using Visual Studio 2010.
It would be nice if the editor provided support for syntax highlighting and Intellisense for Less, for instance coloring and suggesting variables. What are my options to get that to work ? Do I need to write a plugin for it, or how would one go about adding this to VS ? Does anything exist for this already ?
If you are using Visual Studio 2012 you can use Web Essentials 2012. It uses syntax highlighting similar to Visual Studio's CSS syntax highlighter. It compiles to CSS on save.
Update
2.4-2.5 Less syntax highlighting was disabled
As of 2.6 Less syntax highlighting was turned back on
As of 3.8 Less syntax highlighting is disabled for VS2012.
http://www.mindscapehq.com/products/web-workbench
Update (07 Mar 2012)
After a week or so of using this, I have uninstalled it due to:
Annoying nagging adverts telling you to upgrade
A weird bug that stopped me being able to save my .less files intermittently
This extension seems better : LessExtension
Here is the author description :
Autocompile on save (using dotless)
Highlight matching braces
Syntax highlight (No multiline comment support)
Word highlight when a word occurs multiple times
Word completion using Visual Studios css 2.1 definition
Outlining so { ... } sections can be collapsed
And it work nice for me.
I can't find one on the Visual Studio Gallery (as of 5/2/10) besides CSS Is Less, which only hooks up the built-in CSS language service.
If you want to learn how to write one yourself, you can start by looking at the Ook Language Integration sample. Implementing the extension points in that sample (classification, quick info source, completion source) will give you the features you asked for (syntax highlighting, hover tips, intellisense completion).
I'm working on a page using <canvas>, which is a HTML5 tag, in Visual Web Developer Express Edition 2008, and the validator in the HTML editor is telling me it's an invalid tag. That's because it's set to validate against XHTML 1.0 Transitional. I'd prefer for it to not do that and tell me what's valid or invalid based on the HTML5 doctype, but I can't find anywhere in the preferences that suggests this would be possible.
Is there a way to tell Visual Studio to validate against HTML5, or add a new spec reference manually? I'd prefer not to have to go in and add tags manually, which appears to be the only option at the moment.
It looks like the Visual Web Developer team solved the problem by adding HTML5 support themselves:
http://blogs.msdn.com/webdevtools/archive/2009/11/18/html-5-intellisense-and-validation-schema-for-visual-studio-2008-and-visual-web-developer.aspx
You all probably know that new HTML 5 standard is coming. We made a new intellisense schema that you can add to VS 2008 or VWD Express 2008 and get intellisense and validation on HTML 5 elements.
For Visual Studio 2010 you'll want to install the Web Standards Update for Visual Studio 2010 SP1:
It updates the HTML5 intellisense and validation to reflect the latest
W3C specifications and fixes some bugs bugs in the current SP1 support
for HTML5. Also JavaScript intellisense it updated to reflect many of
the new browser capabilities such as Geolocation and DOM storage.
Finally, this update adds comprehensive CSS3 intellisense and
validation based on the latest specifications from W3C.
For Visual Studio 2008, Microsoft has provided an updated version of the HTML 5 validation schema and intellisense in the Visual Studio Gallery.
HTML 5 Intellisense
The updated schema was posted by Mikhail Arkhipov, the same Microsoft employee who wrote the blog post linked in Rahul's answer.
I created a validation schema that you're free to use:
http://johndyer.name/post/2009/07/21/HTML5-XHTML5-Validation-Schema-for-Visual-Studio-2008.aspx
This is now included in Visual Studio 2010 SP1
You can define your own validation standards.
You need to add the file to the folder in VS install, and add to the registry.
This is the description I used (HTML and CSS have a very similar approach): http://blogs.msdn.com/mikhailarkhipov/archive/2007/10/19/how-to-create-custom-css-intellisense-schema-in-visual-studio-2005-and-2008.aspx