Visual Studio 2015 does not update build directory

I am currently trying to develop an app using the Ionic 2 framework within Visual Studio 2015. I created the project using CLI and then I imported it to my Visual Studio with no problems.

Then, I decided to make some changes inside the app directory (I added a new tab to the app with an OpenLayers 3 map, for example) and I found out that when I try to build the project and run it, the build directory inside www’s one is not updated with my changes and I am not sure if it is some kind of bug in Visual Studio or a misconfiguration I made. You can take a look at my code if you want here.

Does anyone have the same problem?. Thank you all.

PD: if I use the CLI to build the project it works perfectly and the build directory is really updated with all my changes.

I guess you should probably configure VS 2015 to work with Gulp, here are some random links:

PS: Any reason why are you not using VS Code instead? IMHO it’s much better suited for web development (esp. Ionic 2 and Angular 2 apps) than VS 2015. I still haven’t tried 2015 but based on my experience with the previous versions of VS, I definitely prefer VS Code.

1 Like

I found a solution to my problem following @iignatov hint:

Step 1: Install es6-promise.

In my case, I had not installed es6-promise module into my Ionic 2 app, so first of all I installed it using:

npm install es6-promise

Step 2: Configure gulpfile.js.

At the top of this file, I added the line: var Promise = require('es6-promise').Promise;


Step 3: make “clean” and “build” tasks run before building the project

  • Using Visual Studio 2015, do right click in the gulpfile.js and open the Task Runner Explorer

image

  • Once there, you can bind the clean and build to run them before building the project

image


And that’s all. Whenever you try now to build or run your app using Visual Studio 2015, this two tasks will be executed before building the project and the build directory inside www folder will be updated. Thanks

2 Likes

@iignatov Mainly muscle memory…, another reason why I keep using VS is Resharper.

1 Like