Showing posts with label intellisense. Show all posts
Showing posts with label intellisense. Show all posts
Visual Studio intellisense for HTML 5
It's the time to use the new technologies like HTML 5. Everyone of us knew about what this is and how easy now to generate some nice and rich UI without put much efforts. No complex javascript, no silverlight or flash is required most of the time and many more advantages. There are plenty of changes in CSS too. So, I believe we should start using HTML 5 in our applications. Because almost all browsers are supporting it.
After I have written some posts on Visual Studio intellisense on Jquery and SharePoint 2010 ECMAscript Client OM, I want to write similar on the intellisense for HTML 5.
This is very simple process than any other we have followed.
1. Download the HTML5 intellisense file from the official vs tools site. Visual Studio intellisense for HTML 5. Applies to both VS 2010 and VS 2008.
Note: In internet there are few sites already written related to this post. But, they are not providing the valid HTML 5 XSD files. They are downloading files from somewhere else and giving us. Those files are not up to date. So, try to download the files always from the site who created them. In this case Microsoft. The link I have given is official VS tools web site.
2. Now run the file and select the preferences and finish the installer.
3. Now you can see new files updated with the name HTML_5.XSD at the location: C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Packages\schemas\html [For VS 2008] and C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\schemas\html [For VS 2010].
4. And the MSI update we have ran automatically updates the registry key and other settings. So, no more changes we have to do manually.
5. Now, if you have opened the Visual Studio, please close it and reopen it.
6. Now, from the Visual Studio toolbars, "HTML Source Editing" we have a drop down for selecting the HTML version as shown below.
7. Once we have selected that option we are good to go and write HTML 5 code as shown below.
8. In the above code sample, I am trying to render a video and it is showing me all the attributes for the video tag.
That is it!!! There we are.
Hope you liked it. Read More...
After I have written some posts on Visual Studio intellisense on Jquery and SharePoint 2010 ECMAscript Client OM, I want to write similar on the intellisense for HTML 5.
This is very simple process than any other we have followed.
1. Download the HTML5 intellisense file from the official vs tools site. Visual Studio intellisense for HTML 5. Applies to both VS 2010 and VS 2008.
Note: In internet there are few sites already written related to this post. But, they are not providing the valid HTML 5 XSD files. They are downloading files from somewhere else and giving us. Those files are not up to date. So, try to download the files always from the site who created them. In this case Microsoft. The link I have given is official VS tools web site.
2. Now run the file and select the preferences and finish the installer.
3. Now you can see new files updated with the name HTML_5.XSD at the location: C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Packages\schemas\html [For VS 2008] and C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\schemas\html [For VS 2010].
4. And the MSI update we have ran automatically updates the registry key and other settings. So, no more changes we have to do manually.
5. Now, if you have opened the Visual Studio, please close it and reopen it.
6. Now, from the Visual Studio toolbars, "HTML Source Editing" we have a drop down for selecting the HTML version as shown below.
7. Once we have selected that option we are good to go and write HTML 5 code as shown below.
8. In the above code sample, I am trying to render a video and it is showing me all the attributes for the video tag.
That is it!!! There we are.
Hope you liked it. Read More...
SharePoint 2010 ECMAScript Intellisense in Visual Studio 2010
This post is a very big help to the SharePoint 2010 developers. We need the intellisense help to write code fast in our SharePoint applications. But, in SP2010 BETA I faced so many problems to find what methods a java script object has. After written a long post on how to get the java script intellisense working in Visual Studio 2008 this is now an easy for me to do the same on Visual Studio 2010. I just tried the same implementation in VS 2010 and that worked great. So, there I started and started using it in ECMAScript development. When I first see the intellisense working in VS 2010 felt very very happy and jumped into the air. Because, before to find the same methods in the ECMAScript object, I had wasted hours and hours. One of the example is this post "How to know all methods in SP object".
Solution:
By using reference tag everything possible.
All at once:
Once add the reference tags, write something and see the intellisense loads all the methods in the specific SP object as shown below.
Hope this helps you a ton and make your development on ECMAScript more faster and faster than ever. Read More...
Solution:
By using reference tag everything possible.
- Create a js file in VS2010.
- Add the below script as the first line. /// <reference name="MicrosoftAjax.js" />
- The MicrosoftAjax.js reference should be in the first line. What is it? why it is needed? I know the question are always in mind... This is the default js files which comes with visual studio. It has all the default methods for Sys.* available. More details here. "Make sure any dependencies are taken into account in the order of declarations. Most of the time, you will want "MicrosoftAjax.js" to be on the top." Some of the SP objects depends on this file.
- Now, it's time to link SharePoint ECMAScript java script files linking. We need to add only debug.js files to the reference files to get intellisense working.
- /// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.core.debug.js" />
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.debug.js" /> - SP.Core.Debug.Js and SP.Debug.Js files are the primary files needed to develop the ECMAscript. So, these two are the main and should be added to the js file after MicrosoftAjax.js reference.
- Like this, you can add whatever debug.js files available in the SharePoint 14 hive layouts folder. For example, if you are developing on Ribbon then the reference will be
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.Ribbon.debug.js" />
All at once:
/// <reference name="MicrosoftAjax.js" />
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.core.debug.js" />
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.debug.js" />
Note: Add all other debug.js files depends on your requirements right after the 3 reference tags./// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.core.debug.js" />
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.debug.js" />
Once add the reference tags, write something and see the intellisense loads all the methods in the specific SP object as shown below.
Hope this helps you a ton and make your development on ECMAScript more faster and faster than ever. Read More...
Refresh intellisense local cache in Sql Server 2008
Everyone knows that Sql server 2008 has an excellent feature for supporting the intellisense. This will surely fasten the development. Last week, I have created 3 tables in my Sql server 2008 and when I try to write the stored procedure based on those tables, surprisingly they weren't shown in the intellisense any more. I thought initially it's a bug in Sql Server 2008. Lately after done some research and found that we need to refresh the cache for intellisense to shown up everything correct. Please find the below article which is more helpful and detailed.
http://cherupally.blogspot.com/2009/12/how-to-get-sql-server-2008-intellisense.html
Read More...Jquery intellisense in Visual Studio 2008
This is a small tip I want to tell to my readers. I know, most of the dev's think like if Jquery intellisense is available in visual studio then that will be good :). So, this post will help you to solve that problem.
Below are the steps we need to follow to get the intellisense working in Visual studio 2008. Before start with the steps I will tell you how it helps us.
Note: the path value is the actual path of the vsdoc file.
<% if (false) { %>
<script src="jquery-1.3.2.min-vsdoc.js" type="text/javascript"></script>
<% } %>
Note: The Jquery file reference should always be the top of the Jquery documentation file reference. And if you install Visual studio SP1 and the hot fix then there is no need to place the complete IF block from the above code. And the vsdoc file should be in the same folder where the jquery file is.
Note: The short cut for the update intellisense in Visual Studio is Ctrl + Shift + J. So, once reference added please done it once to update the intellisense.
How, Jquery intellisense work in Visual Studio?
It's simple. What JQuery –vsdoc.js file contains? Nothing but the description text for all the defined methods and properties. So, when you refer the vsdoc file in js file, it will load that file into memory and set the meta data for the Jquery methods and properties. If you refer the vsdoc file in ASPX pages, then it will set the metadata as follows.
First, Visual studio will look for the JQuery file, example jquery-1.3.2.js. And then it will look for the file which has the format jquery-1.3.2-vsdoc.js. If it matches then only visual studio loads the meta data and intellisense will work, otherwise not. So, your jquery file and documentation file should be having the same name with –vsdoc at end of the documentation file name.
Note: Jquery file: jquery-1.3.2.js and Jquery visual studio documentation file name: jquery-1.3.2-vsdoc.js
Lastly, I want to explain about the load time from above mentioned bullet. If you observe the code I have given, it has some server-side code integrated in it. I wrote if condition which always fails to execute the code inside the if block because I am passing false always to it. So, it never runs the code inside the if block and nothing loads on the client side related to vsdoc file. At the time of development, server-side code won't run but all the meta data will load because there is a script tag on the page. So, at development time, the vsdoc file will load, but when you browse the page, vsdoc file won’t render.
That's it!!! I hope this will give nice idea of how Jquery documentation work in visual studio and how to add the reference to your files. Isn’t it? Please give your valuable feedback or comments on this post. Read More...
Below are the steps we need to follow to get the intellisense working in Visual studio 2008. Before start with the steps I will tell you how it helps us.
- Learn more and implement more: Because of having this intellisense support in vs 2008, we can solve so many problems and can implement so much in JQuery. It will be very difficult for everyone to remember all the functions and members for the Jquery objects. So, This will give more support to learn more and implement more.
- Fast and rapid development of the client side scripting. Until you don't know what methods and properties it has you can't write program fast and efficient.
- Time saving: Complete documentation for all Jquery objects, methods and properties. The inline description is more than enough to understand it well. Till these days, every time need to go to Jquery documentation site and need to search for what we need and read about them. But, now everything is in visual studio. Big time saving here.
- Load time: I know, at this point you may think how it will effect load time by adding the Jquery documentation file to page. By adding the vsdoc file [~188Kb] to the page won't increase the page size or won't effect the load time at all. We will refer the documentation file while coding or at development time only but it won't render on the client side. How? I will explain it later in this post.
- Install Visual Studio SP1.
- We need to download the vsdoc file from here.
- Install the hotfix for visual studio before proceed.
- Refer the documentation file to js file: If you need jquery intellisense on the js file then you need to write the below declaration as the first line of your js file.
Note: the path value is the actual path of the vsdoc file.
- Refer documentation file in ASPX page: This is what we need most of the times for writing inline scripting on the page. So, add below code to the <head> tag of the page for JQuery intellisense.
<% if (false) { %>
<script src="jquery-1.3.2.min-vsdoc.js" type="text/javascript"></script>
<% } %>
Note: The Jquery file reference should always be the top of the Jquery documentation file reference. And if you install Visual studio SP1 and the hot fix then there is no need to place the complete IF block from the above code. And the vsdoc file should be in the same folder where the jquery file is.
Note: The short cut for the update intellisense in Visual Studio is Ctrl + Shift + J. So, once reference added please done it once to update the intellisense.
How, Jquery intellisense work in Visual Studio?
It's simple. What JQuery –vsdoc.js file contains? Nothing but the description text for all the defined methods and properties. So, when you refer the vsdoc file in js file, it will load that file into memory and set the meta data for the Jquery methods and properties. If you refer the vsdoc file in ASPX pages, then it will set the metadata as follows.
First, Visual studio will look for the JQuery file, example jquery-1.3.2.js. And then it will look for the file which has the format jquery-1.3.2-vsdoc.js. If it matches then only visual studio loads the meta data and intellisense will work, otherwise not. So, your jquery file and documentation file should be having the same name with –vsdoc at end of the documentation file name.
Note: Jquery file: jquery-1.3.2.js and Jquery visual studio documentation file name: jquery-1.3.2-vsdoc.js
Lastly, I want to explain about the load time from above mentioned bullet. If you observe the code I have given, it has some server-side code integrated in it. I wrote if condition which always fails to execute the code inside the if block because I am passing false always to it. So, it never runs the code inside the if block and nothing loads on the client side related to vsdoc file. At the time of development, server-side code won't run but all the meta data will load because there is a script tag on the page. So, at development time, the vsdoc file will load, but when you browse the page, vsdoc file won’t render.
That's it!!! I hope this will give nice idea of how Jquery documentation work in visual studio and how to add the reference to your files. Isn’t it? Please give your valuable feedback or comments on this post. Read More...
Subscribe to:
Posts (Atom)



