Visual Studio 2013 JS HTML Template - javascript

before i reinstalled visual studio i had an option to choose a blank html/js only template. There is still an option for a blank JS project but it's different and it seems like it's supposed for windows 8 store apps.
I found a picture from a typescript template. I had the same option for javascript:
(source: msdn.com)
Now it's gone and I'd like to have it back. Maybe someone can help me out?
Thanks in advance

You have to restore the default project templates so as to fix your problem.
In the command prompt, navigate to the location of devenv.exe. This file is located in <Visual Studio Installation Path>\Common7\IDE.
Note:
If you are running Windows Vista or Windows 7, you must open the command prompt as an administrator
Type "devenv /installvstemplates" and press Enter.
Note:
If you are using an Express Edition of Visual Studio, type "<ExpressName>Express /installvstemplates" where <ExpressName> is either VB or VCS for Visual Basic and Visual C#, respectively.
By default, templates installed together with the product are located in:
\VisualStudioInstallationDirectory\Common7\IDE\ItemTemplates\Language\Locale\
\VisualStudioInstallationDirectory\Common7\IDE\ProjectTemplates\Language\Locale\
For example, the following directory contains the Visual Studio project templates for English:
C:\VisualStudioInstallationDirectory\Common7\IDE\ItemTemplates\VisualBasic\1033\
Try to empty them first and then reinstall .If this procedure does not restore the default templates, reinstall Visual Studio.

Related

Visual Studio crashing when i change .js file

I am working on a Visual Studio MVC project. (Version = 2013 )
When I try to write any javascript code in .js file or .cshtml file Visual Studio crashing and restarting.
When I open Menu > Tools > Options > Text Editor > Javascript menu and disable "Auto list members" and "Parameter information" the problem is solving.(There is no any crashing)
But I cant see properties of javascript functions on editor. (Because i disabled it to remove crashing error on previous step.I have already tried to delete .suo file and rebuild solution method but not worked on my project. There is still crashing if i write javascript code. )
How can I solve this crashing problem without disable to Auto list members" and "Parameter information" properties?
I'm using Resharper and had the same problem, the solution whas to deactivate Intellisense in Resharper => Options => Environment => IntelliSense => General for .js files
Restart Visual Studio in Administrator mode.
If the same issue still occurs, try to move your project to another directory.
I had same problem few months ago, I could not find the answer so I tried to install another version of VS. Installing Visual Studio 2017 solved it.

Visual Studio 2015 fails at opening java script files after TypeScript installment

The project contains both c# and javascript source code. And I use visual studio 2015 (3) for the development. Since installing the TypeScipt 2.0.3 I cannot open the .js source files in editor. The message that pops up is:
An error occurred trying to load the page.
No exports were found that match the constraint:
ContractName Microsoft.CodeAnalysis.Editor.TypeScript.ScriptContexts.ITypeScriptProjectProvider
RequiredTypeIdentity Microsoft.CodeAnalysis.Editor.TypeScript.ScriptContexts.ITypeScriptProjectProvider
And it is also appearing in the TypeScript Build tab under solution properties.
Has anyone experienced the same issue or has any ideas on how to solve this? I'd like to edit the .js files in Visual Studio.
Try deleting the folder
"C:\Users\<userName>\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache"
and then restart Visual Studio. This worked for me.
Delete the following folder and restart Visual studio.
C:\Users\yourusername\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
N.B. : The AppData folder may not appear on the first place. Unhide all hidden items from View tab and then follow the path.

Typescript not compiling on save or publish in Visual Studio 2017

It seems not matter what I do, I cannot get my .ts files to compile into .js files. I have uninstalled and reinstalled Visual Studio 2017 Community and I now have VS 2017 15.2 (26430.15) and Typescript 2.2.2.0 (according to the About window inside VS).
Steps I am taking:
Open Visual Studio, File -> New Project
ASP.Net Web Application (.Net
Framework)
Select 'empty' template, add references for MVC
Add a new folder called 'Scripts'
Add a new ts file called ts1.ts
Open ts1.ts and add single line (e.g. var a = 1)
Save - no JS emitted.
Build - no JS emitted.
Ask VS really nicely - no JS emitted.
I've tried it with/without tsconfig.json and I have tried adding compileOnSave to tsconfig when I have added it.
Help?
edit: There are no build errors or warnings and I get a message in the footer saying Output(s) generated successfully.
Do you not just need to select "Show All Files" in the Solution Explorer. I have just followed your exact steps, and when showing all files, I can see the JS file, its just not automaticly added to the project.
Spot the idiot.
I had to enable 'view all files' to see the generated JS.

Recreate Visual Studio project file

I'm trying to deploy my first C# web app using Visual Studio 2013, and the web deployment package fails with the message
Error 43 Copying file Content\lib\bootstrap-timepicker\Gruntfile.js to obj\Release\Package\PackageTmp\Content\lib\bootstrap-timepicker\Gruntfile.js failed. Could not find file 'Content\lib\bootstrap-timepicker\Gruntfile.js.
and the item itself displays
The item 'Gruntfile.js' does not exist in the project directory. It may have been moved, renamed, or deleted.
when attempting to open it. Gruntfile.js appears in numerous project folders, not just the one folder in which it carries the warning logo.
Where can I get a copy of just the bootstrap-timepicker Gruntfile.js, and how should it be imported into the project? The "Getting Started" and "Installing Grunt" sections of the gruntjs website seem to only discuss the original acquiring of the product, not necessarily how to recreate a corrupted version. Thanks in advance!
It looks like it's a file missing in one of your folders. And it looks like this component: https://github.com/jdewit/bootstrap-timepicker
You can download the gruntfile.js from there, and (just using Windows Explorer) paste it into the folder location specified in the error message. If it's named as part of the project already Visual Studio will pick up that it's been added, or you can refresh the folder in the Solution Explorer view.
Do the same for any other missing files. You can see what's missing in Visual Studio because the files will have a little yellow triangle next to them containing an exclamation mark.

Visual Studio 2012 JavaScript Intellisense Not Working

I have Visual Studio 2012 installed on my laptop and desktop. On my desktop PC, the JavaScript intellisense is not working. For any method it pulls up (even standard JavaScript calls) I receive the message, "Intellisense was unable to determine an accurate completion list for this expression".
I've tried all of the suggestions from the other posts and tried everything I could find on Google. Nothing has worked. It isn't about not having JQuery Intellisense. I don't get even basic JavaScript Intellisense.
Edit:
The objects in the above images are simple strings, yet I don't get any help from the Intellisense.
I had the same problem: in Visual Studio 2010 I was used to add a reference in my javascript files, at the top, like this:
/// <reference path="/scripts/jquery-1.7.1-vsdoc.js" />
With the new Visual Studio 2012 this was not working anymore, I looked around and found the solution to put the reference in /scripts/_references.js I did so, not working.
What I was doing wrong was that I was referencing the vsdoc.js file, or at the moment of writing, nuget downloaded jquery 1.9.1 package, reference to jquery-1.9.1.intellisense.js which is WRONG.
The correct reference (if using the /scripts/_references.js file) is:
/// <reference path="/scripts/jquery-1.9.1.js" />
(NOT the .intellisense.js or the -vsdoc.js file).
For the global solution to work on all your projects: copy all the jquery files (main, minified, map, and intellisense one, to be sure) in C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References (adapt the path if you installed Visual Studio 2012 somewhere else) and in Visual Studio, under Tools > Options > Text Editor > Javascript > Intellisense > References > Add a reference to jquery-1.9.1.js (again, NOT the vsdoc or intellisense file, but the main one) as explained in the solution by denas (but it was not clearly said not to point the vsdoc/intellisense file).
Hope this helps.
Many things can cause problems like this, but I usually follow these steps to troubleshoot it.
close visual studio and restart
reboot windows and start visual studio again
have another developer load your project and test it
create a bare bone project and test with all stock javascript references
reset IDE
run VS in safe mode and test your project
uninstall and reinstall vs
I usually resolve most of the VS problems at step 3 or 4, and sometimes 5.
If you've installed VS on anything other than the C Drive this will happen.
In Visual Studio, under Tools > Options > Text Editor > Javascript > Intellisense > References
Add references to the same .js files that exist in the list but pointing to the new path where you have VS installed
eg - G:\Program Files\Microsoft Visual Studio 11.0\JavaScript\References.libhelp.js
There are 5 of them
After this go to Edit> Intellisense > Refresh external references
I fixed the same problem by right-clicking the file in Solution Explorer and choosing Open With and then choosing Web Form Editor if you're editing a Web form or Source Code (Text) Editor if you're editing a JavaScript file.
In visual studio 2012,
Using this solution https://github.com/jmbledsoe/angularjs-visualstudio-intellisense.
Make sure put ng, ngCookies modules into required fields. For example:
var module = angular.module("demo", ['ng','ngCookies']);
An excellent article by Mads Kristensen helped me fix the JavaScript Intellisense issue.
Triple-slash references look like this and can be added to
the top of any .js file or in /scripts/_references.js file
/// <reference path="../app/respond.js" />
REF: http://madskristensen.net/post/the-story-behind-_referencesjs

Categories

Resources