Visual Studio offers the ability to extend the Intellisense support when editing XML documents by specifying an XSD that will be used to validate the XML.
Does Visual Studio offer any such support for the Razor Editor, such that I can specify an XSD and Intellisense will offer autocomplete suggestions for these new types?
This will probably work. Visual Studio uses html_5.xsd file to provide autocomplete. you can provide your xsd by placing it next to html_5.xsd (which is probably in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\schemas\html) and then editing html_5.xsd to include your file. A Visual Studio restart is required.
<xsd:include schemaLocation="MyAwesomeTypes.xsd" />
Related
I would like to develop an arm template. as I am reading in Microsoft docs, there are some useful functions, which I can use.
My question is now, why I can not see some of these functions in visual studio for example newGuid()
or guid()
what should I do to have them in visual Studio?
I am using visual Studio 2019.
The visual studio don't have a IntelliSense for the ARM template, to do that you need to use visual studio code and use this extension: https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools
With this, you will have IntelliSense for the ARM and you will see the functions and a lot of things. It greatly improves the creation and work with the Arm template!
I was checking the extension HTML Tools for Visual Studio and I found very useful the Peek definition functionality allowing you to edit css files while you're in html. My problem is that I work in ASP .NET Web Pages, using .apsx files to develop, which haven't got this feature.
Do you know if there is any way to enable this peek definition for .aspx files?
Visual Studio 2017 now supports use of a Jupyter Notebook.
A Lap Around Python in Visual Studio 2017
According to the MSDN blog post:
To work with a notebook, simply download your IPYNB file as a .py file and open it in Visual Studio. You’ll see that markdown cells have been turned into comments and each cell is collapsible and expandable.
When I download a IPYNB file, rename to a .py file, it displays in the VS editor as a JSON file containing markdown. I was expecting to see a markdown file. What am I missing?
#Jonathan answer is correct. The MSDN blog was referring to Jupyter Notebooks menu item File->Download->Python (.py). There's additional considerations in getting a notebook to run and ultimately a issue with quality of experience.
To use a notebook in Visual Studio, download using Jupyter as stated above.
Specify the Python environment as Anaconda as shown in the blog image. To do so, either set Anaconda as the default environment or create a solution from existing files that specifies Anaconda as the environment.
Open a Python interactive window to display notebook execution.
Use Ctrl-Enter to step through notebook's statements.
That said, be aware that Visual Studio's notebook-ish experience is not at the level of Jupyter's, for now. Until VS directly integrates notebooks (.IPYNB files), I see little advantage of using VS over the real Jupyter.
VS has fewer and semantically different key bindings than Jupyter.
Jupyter's formatting (HTML) is far superior to VS (text).
There's little support and documentation for notebook-ish in VS.
The whole VS notebook-ish experience lacks polish.
IMHO, the beauty of Jupyter is the single window experience but VS uses two.
This is what I believe they mean with the download as.
You need the Notebook running then click on File-> Download as-> Pythong(.py)
Once you have downloaded your Python file from the notebook you can open it in Visual Studio.
Edited: added the rest of the answer
As an alternative to Visual Studio that does not integrate well iPython notebooks, did you look at PyCharms that is a nice Python IDE (as far as I use it for now^^).
It provides a nice rendrering of ipython notebook inside the IDE making it a common IDE for python and iPython stuff. Maybe it worth a try.
I'm using the C# package of Visual Studio 2010 Express. I want to add an HTML file to my project, but the C# package doesn't seem to have HTML support (e.g. syntax highlighting) included.
I tried installing the Web Developer package hoping it would simply add features to my existing installation. Turned out that they are acting like different programs though. Still no HTML features.
Is there any way to do this?
If all you need to do is edit some HTML and want highlighting, may I suggest a free advanced text editor such as Notepad++ ?
Since Visual Studio 2010 is slated for release in March of 2010 and HTML 5 is now starting to be used even more widely, I would like to know if Visual Studio will ship with HTML 5 templates, standard controls and support for the more common markup?
A definition for support of HTML 5 would be that any new version of Visual Studio should have similar support for code-completion, validation and markup that is currently supported for HTML 4.01 and XHTML 1.0 and 1.1.
Update From the Visual Web Develolper Team Blog:
HTML 5 intellisense and validation schema for Visual Studio 2008 and Visual Web Developer is for downloading. Follow the instructions posted on the page to install the new scheme. Seems like the Visual Studio Team will be supporting HTML 5 after all.
February 2011 Update from the Visual Web Developer Team Blog
Visual Studio 2010 SP1 finally adds some support for HTML5. "The entire HTML5 specification isn’t supported but most of the new elements and attributes are. That means you get both intellisense and validation for HTML5 with SP1." Read More Here
May 2011 Update from Scott Guthrie's blog
Just this month, Microsoft has pushed out some HTML5 improvements with the ASP.NET MVC 3 Tools Update. While the post seems to be very pro MVC, it's nice to see that Visual Studio 2010 now has default templates and intelisense support for HTML5; along with a nice addition of a jQuery script that will give some backwards support for older browsers.
The download from the Web Developer Team blog is for Visual Studio 2008. In order to add schema validation support to Visual Studio 2010 you'll want to make some subtle changes:
Add the schema to your 2010 (10.0) folder rather than to your 9.0 folder (duh):
So e.g. change the path in the readme from
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Packages\schemas\html
to
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\schemas\html
Second, EDIT the registry file that is appropriate for your Windows bit version, again replacing the 9.0 with 10.0 - for instance for my 64 bit windows the file reads as follows:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{1B437D20-F8FE-11D2-A6AE-00104BCC7269}\Schemas\Schema 23]
"File"="html\\html_5.xsd"
"Friendly Name"="HTML 5"
"URI"="http://schemas.microsoft.com/intellisense/html-5"
I think real question is - will Microsoft support HTML5? Multiple places on the internet I found that Microsoft is seriously considering to support HTML5. If that is true, it makes sense to expect VS 2010 to support HTML5.
Just released today: Web Standards Update for Visual Studio SP1.
You can use this tool from Microsoft Gallery:
HTML 5 Intellisense and validation schema for Visual Studio 2010 and 2008
Check the following links for more details:
HTML5 & CSS3 in Visual Studio 2010 SP1 1
How to Create HTML5 Website and Page Templates for Visual Studio 2010
If anyone is having trouble getting the HTML 5 schema tool to work in Visual Studio 2010, take a look at this blog post I found which is a great help:
raihaniqbal.net - HTML5 Support In Visual Studio 2010
How can you support something that doesn't exist? Something you can't validate against because there's no accepted spec?
Yes they could build in support for the experimental DTD, but they did that with XML/XSLT/XPath and ended up fragmenting XML support for far too long and were attacked for it from all sides.
Giving that people like Google are now pushing for tags they want just to make supporting Wave easier it's going to be a long time before HTML5 is done, and the "standard" is going to fluctuate and change - so why waste time and resources trying to hit a moving target?
A simple answer is yes. Visual studio has been working on this from long time.
"
How can you support something that doesn't exist? Something you can't validate against because there's no accepted spec?
Yes they could build in support for the experimental DTD, but they did that with XML/XSLT/XPath and ended up fragmenting XML support for far too long and were attacked for it from all sides.
Giving that people like Google are now pushing for tags they want just to make supporting Wave easier it's going to be a long time before HTML5 is done, and the "standard" is going to fluctuate and change - so why waste time and resources trying to hit a moving target?
" link text
Oh my god! Are you kidding me??? C++ was used by 1.5 million programmer worldwide before it was standardized. link text In the mid-to-late 90's, 50%+ of all software development was done in C++ before it was standardized in 1998. Even when there was an ANSI C standard, very few compilers actually used that standard without countless ambiguous differences. And don't even get me start on how badly all the browsers have followed the HTML standards! In fact, still today no two browsers work exacly 100% the same because they still can't follow the HTML or CSS standards that exist now.