Remember back in CRM 2011 days, there is this XrmPageTemplate.js file from CRM SDK? Visual Studio will give you nice JavaScript intellisense if you refer to this file from your JavaScript. My question is how do you do the same for CRM 2015? Thanks.
On GitHub you can find the Definitely Typed project containing TypeScript definition files, among which those for Dynamics CRM.
Add the definition file to your web project and name it, say, "Xrm.intellisense.ts". Reference it in your Javascript file by adding the following line at the top of the page. (You will probably need to adjust the path.)
/// <reference path="/Scripts/References/XrmPage.intellisense.ts"/>
Intellisense will work great with Resharper.
Related
I really want to use this plugin. But once I do "Export as Snippet", I can't see a new tab where I can manage the snippet, set the Shourcut and such (as shown in the video). I only see this popup:
What is going on? Add new item?
I've updated to the last (update 3) version of Visual Studio 2015, and I've Snippet Designer 1.6.2.
UPDATE - WORKAROUND, AND POSSIBLE FUTURE FIX
I have tested Snippet Designer with Web Forms (Web Site Projects), and it does not work as described in the video, i.e. with the snippet file being automatically created.
However, it is possible to continue working with Snippet Designer, by selecting the Project Item named Code Snippet, as follows:
Create or open a Web Site project.
Select the text you wish to make a Snippet. Right click and select Export as Snippet.
In the New File Dialog window that opens, you need to locate the File Type Code Snippet. The easiest way in a long list of installed File Templates is to use the search feature, typing snippet.
Click Add. The file will be added to your project, and now Snippet Designer will activate, and function as normal.
NOTE: This is creating a default C# Code Snippet file, not the snippet file that is included within the Snippet Designer .vsix archive; it makes no difference as both files are empty, and Snippet Designer has its own code for building the contents of a snippet file according to the relevant XML schema, as specified by Microsoft.
A possible reason why Snippet Designer does not automatically create the snippet file itself, as it does with other projects, is that Web Site projects use a different approach to project metadata; for example, they do not have a .csproj file, which is typically used to list the files within a project.
It could also be that the code creating the snippet file asks Visual Studio, via Automation, to create a new instance of the snippet file Item Template; on a default Visual Studio 2015 installation, the listing of available Item Templates for a Web Site Project are located in:
C:\Program Files (x86)\Microsoft Visual Studio
14.0\Web\WebNewFileItems\NewFileItems.vsdir
Snippet Designer also includes a .vsdir file that has an entry for its own bundled snippet file, the source can be viewed here:
https://github.com/mmanela/SnippetDesigner/blob/master/src/SnippetDesigner/Templates/SnippetFile.vsdir
I would suggest the author of Snippet Designer investigate if the entry here is the source of the problem.
Microsoft provide documentation for the metadata contained in .vsdir files here: Template Directory Description (.Vsdir) Files
I do actually recommend a different product. My original answer continues below:
CURRENT SITUATION
As has been documented on the Snippet Designer GitHub Issue Tracker, there are issues with specific project types not being recognised, and therefore features not available.
The last commit to the Snippet Designer GitHub project was 1 year ago (November 2015); in view of the number of unresolved issues and lack of development, I would suggest a known working open source alternative.
WORKING ALTERNATIVE
Code Snippet Studio is another free, open source project for creating, editing and managing Snippets that fully supports Visual Studio 2015 (including Update 3), and which is actively developed and released:
Code Snippet Studio
Code Snippet Studio is an extension for Visual Studio 2015 that makes it easy to create, edit, package, and share IntelliSense code snippets for Visual Studio 2015 and Visual Studio Code. For C# and Visual Basic snippets, it also provides live Roslyn code analysis as you type to immediately detect code issues.
Note that multiple languages, including C#, VB, SQL, HTML, JavaScript are supported, among others. The image below shows VB editing.
Code Snippet Studio runs as either a Tool Window in Visual Studio 2015, or, as a standalone application (which personally I find ideal for working alongside Visual Studio Code on a laptop, or to make quick updates to my snippet packages).
Features include Roslyn based intellisense and analysis while editing snippets, specification of namespaces that need to be imported to support the Snippet, the ability to export to Visual Studio or Visual Studio Code, and optionally, create a VSIX file for installation on multiple machines.
FURTHER INFORMATION
For more information, the following links are useful:
Channel 9 - A Look Behind Code Snippet Studio (with Video)
GitHub Project
Getting started Guide
Channel9 - One code snippet at a time [and more] with the Code Snippet Studio
This is a known problem, see github issues 57, 70, 84, 109. I can only suggest that you persuade addon author to fix it, or fix it yourself :)
I was trying to create lists, content type and site columns through Visual Studio 2010. There were options of adding content type and list instance but not of content type. So, I could not figure out how to add site column? What item do I need to add for this and what kind of coding is to be done for the same?
this resources may help you:
Walkthrough: Create a Site Column, Content Type, and List for SharePoint => http://msdn.microsoft.com/en-us/library/ee231593.aspx
You may also try SharePoint Designer 2010 instead of Visual Studio 2010
You can use CAML but I wouldn't recommend it. The better way is using object model and feature event receiver. An complete example is quite long, here is the link http://zhouyupublic.blogspot.co.uk/2012/11/create-site-column-and-content-type.html.My
My recent favorite way to do the same is using PowerShell. But since you ask about how to do it with VS, it is outside the topic here.
I'm trying to learn game programming. I am using Microsoft Visual Studio 2010 Express on Windows Vista. I want to know how to create a resource file (.rc). The microsoft website gives some fairly ambiguous instructions on creating one. http://msdn.microsoft.com/en-us/library/sxdy04be.aspx. If I go to my Solution explorer, right click and select Add New Item, the IDE does not give a .rc file as one of the options. It only gives me a .cpp, .h and windows form as options. I don't know what to do. I just can't figure out where i'm goofing up. I'd be very grateful if someone could point me in the right direction.
Thanks a lot
Merry christmas!
The Visual Studio Express 2010 does not have the ability to edit resource files. Take a look at this MSDN page it is the listing of which features each version of VS 2010 contain.
From above link. There is no resource editor in the Express Version.
This link discusses a way to add a resource editor to Visual Studio Express.
Also take a look at this MSDN Forum Link It has some tips and links to external editors.
I have installed the MS Dynamics CRM on my windows server 2003. I want to add the javascript to the one of entity that has drop down control, let's say Opportunity entity. But I don't know how to open the CRM in Visual Studio so that i can make changes. I have installed CRM explorer as well as Install the CRM Solution Framework (under folder\CRMSolutionFrameworkTemplate\Setup.cmd)
Using command prompt to install: Setup.cmd {InstallDir} {ProjectName} {Project Long Name} {Organization Name}
How to make the changes, how to get the CRM in VS for edit
While opening the solution from "C:\Projects\MyCrmSolution\SourceCode\MyCrmSolution"
It gives error as :"Mcrosoft.sourceanalysis.target not found error so it can not open the solution". please guide I am new in this stuff....
This can be done thru customization only. You just have to open the form by going to the Settings > Customization > Customize Entity > Opportunity and customize it from there.
Visual Studio is only used to do advanced customization, such as Plugins, Workflow Activities or ASPX pages, every thing else can be done using customization.
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