How to use ECMAScript 6 syntax with Visual Studio 2013 - visual-studio-2013

I am interested in using ECMAScript 6 features in my web application which I am developing using Visual Studio 2013. Currently the syntax does not seems to be working, How can I configure VS to make it work?

If you have Resharper installed in your VS 2013 - from today on you can switch to using ES6:

What I've done for the past few years for my VS solutions is to have the latest version of node.js installed.
From there, I whould create an _buildscripts directory with a package.json file. (NOTE: make sure to set private:true in your package.json)
With that in place I will have a prebuild.cmd (setup as a pre-build script for my project) with something similar to the following...
:CHANGE_TO_CURRENT_DIRECTORY
rem Change to this batch file's drive/directory
CD /D "%~dp0"
:INSTALL NODE DEPENDENCIES AND INSTALL - use call, since it's a batch/cmd file
call npm install
:SET YOUR "start" SCRIPT IN package.json TO BE YOUR BUILD
: such as .... "start":"gulp"
call npm start
From here, you can setup gulp, traceur, browserify and/or another tools targeting newer javascript concepts.
I'm using git, so detecting new/updated files is far easier than with TFS, but you can script at least the checkout of your output directory for transpiled JavaScript.
You can also use something like watchify or gulp-watchify for hanling live edits (via a terminal window).
I realize this answer takes you well outside of VS's integrated tooling, there are some integrated tools, like chirpy and others that do these sorts of things, but my experience is they have be sub-par for my needs, and I've been doing more node development lately.

Seems like the best we can do is to vote for es6 support.
It's strange for me but Web Essentials also doesn't povide ES6 support yet.
As for me I've disabled syntax errors for js files in my VS. Not ideal but at least less eye distracting.

Related

Visual Studio 2017 Grunt tasks

I recently moved to VS2017 and, it turned out I cannot make Grunt tasks work. Node is installed along with Grunt packages, Grunt task is also defined, but Task Runner Explorer in Visual Studio doesn't see it (screenshot is attached):
Hmm... from the documentation for that plugin a known issue is: "Projects inside nested solution folders aren't supported yet". So, my guess is that you won't be able to use this in your current structure given the location of your Gruntfile.js. You could try to confirm this by placing that file in the project root directory.
I happened to have a Gruntfile.js in the parent folder of my projects: 'source', and VS reads it by default. I started using Grunt out of frustration with the WebCompiler extension that is now severely broken in VS2017, and doesn't show signs of being updated anytime soon. I just started using grunt outside of VS to compile my sass and bundle/minify my js, which can be frustrating for my other team members. Anyway, I noticed VS2017 automatically picks up that Gruntfile, even though it's not even in the solution folder for my project. For my non MS projects, that's how I have it set up, because I don't want that insane node-modules folder jungle to end up in my git repo. It's super frustrating that MS now wants us to use open source tools in our projects. Us modern front-end devs are in limbo with sass or scss precompilers.

how to install bower.json and package.json dependencies osx

Visual Studio automatically tracks changes in bower.json & package.json whenever you make changes & save the file. It automatically track new changes. But how would I do it on Visual Studio Code on OSX not sure.
I looked a lot on internet but there are absolutely no resource for dotnet core developers(on osx, linux) on internet. Neither Microsoft has anything mentioned in there documentation.
I have added font-awesome dependency in bower.json
There is a 3rd party bower extension for Visual Studio Code that lets you run the commands more easily from the editor rather than from the terminal, but bower for vs code is not as integrated as it is in Visual Studio.
For general help with dotnet and OSX there are some tutorials using vs code on learn.microsoft.com though not many. The docs site is open source in an effort to encourage community contributions on docs for scenarios like this one.

NSIS Installer and Visual Studio 2015 community Edition

We had a developer leave and I'm trying to make myself familiar with his deployment process. The past developer would create two versions of his install. One was a update and the other was an install.
I see in the src code he has a .NSIS folder with the scripts already written.
How do I use those scripts to build our NSIS installers? I've looked at Visual Installer, but I don't see how to implement those scripts for the build process.
Edit
"He" is the old developer that left. I'm trying to push out a new build of the ACInstall.exe and ACPatch.exe. I've looked at NSIS online tutorials and they mostly talk about creating the script. I have the script but I'm not familiar with how to use it. ie what tool to run to build the ACInstall.exe.
Here are the files he created and how the project's explorer looks.
.nsi files are plain text files and the NSIS compiler (makensis.exe) will produce a .exe from a .nsi.
You need to install NSIS to get the NSIS compiler, Visual Installer just provides Visual Studio integration (syntax highlighting etc).
Anders, you can use a number of NSIS script editors, not sure if this is your requirement. You can use HM NIS, I think it's the better free, but it's a bit 'ole' (more than 8 years for sure). I hope this answer can be of help to anybody looking for the same answer.

Using NPM, Gulp, Grunt, Bower etc with Visual Studio 2013

I've been trying for the past couple of weeks to get my head around the use of the new front end tool chain for web development. In particular using NPM, Bower and primarily Gulp but initially Grunt, to manage front end packages and integrate with my Visual Studio 2013 IDE.
What I can't seem to get my head around is the Gulp/Grunt aspect of this tool chain. I appreciate the NPM and BOWER are just package managers similar to NuGet and simply download code/files to reference.
However, and I'm seriously hoping I'm missing something simple, is how the hell do I get these packages to put the correct file types in the correct locations. e.g. all js files in my Scripts folder, all less/sass files compiled to my "Content" folder? In turn how can I get this to happen when I install a package so when I create my reference in my html files to relevant libraries I'm referring to a "Bower_components" folder or similar?
I've read over various tutorials, the most recent of which seemed to get me quite a long way there but then I got lost at the end (The tutorial). Which has is what has lead me to the conclusion it is the gulp element of things I'm not getting.
Is it possible to get the files to auto include when added to the project or generated by the Gulp task?

InstallShield LE - Is it possible to create a pure web setup project. If so, how?

I have begun the hard work of converting an old Web Setup project to InstallShield LE.
So I have been searching around on how to do this. And my GOD how messy it is.
I did follow one of those guides. It seems I have to install some dummy data to Program Files just to be able to install the web application...? I have found no way to remove/delete the Program Files part of the setup. The setup dialogs shows the target folder as C:\Program Files\whatever.
Is it possible to install the web application ONLY to the correct IIS folder?
I want a clean install. No junk leftovers just because InstallShield is way to limited.
It annoys me to no end that there is no simple installer tool anymore. I even tried to hack the VS2010 setup project package (c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\Deployment) to work with VS2013. It almost loaded, but got a "80070057 - E_INVALIDARG" error on loading it.
If someone brave enough and know how custom project types work could take a go on it, maybe we can get a working (but old) setup project to work again.
The lack of answers and my fruitless search yields one answer. InstallShield LE is not capable of this.
You are better off using WiX for this. Seeing how other have done this and modifying it is the quickest way to get something up and running.
This is the result of such work: http://halsvik.net/downloads/WebSetup2013Installer.zip
And it seems MS has decided to add support for the old Microsoft Setup projects (VDPROJ) again: http://blogs.msdn.com/b/visualstudio/archive/2014/04/17/visual-studio-installer-projects-extension.aspx
https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d

Resources