It should, but unfortunately it doesn’t update the project.
In fact I don’t event see the output from the TS linter and changes in the project (i.e. add text in some pages html) are not reflected in the platform/windows folder…
It looks to me like the Ionic project does not get rebuilt
Can you switch to VS Code? The way I “solved” these problems was ditching Visual Studio and going to Sublime. But you might be more comfortable in VS Code, which is much more respected than Visual Studio around here.
I am using VS code. And I need to open VS2017 just to compile the windows platform.
So what I need is a command to update the windows platform so that I can open it in VS2017 and compile.
So far only this works:
Work on the app in VS Code
Run ionic serve to build the Ionic project
Run ionic cordova prepare windows to update the windows platform
Build the windows platform with VS2017
My question is: why is step 1 required? Shouldn’t ionic cordova prepare build the Ionic project as well?
I am not 100% sure, in the recent CLI releases a build was added to a lot of steps but I am not sure if ionic cordova prepare was one of them. If it doesn’t output the build step stuff, it doesn’t build…
By the way: Be aware that ionic serve and ionic build and ionic build --prod and ionic cordova build windows do slightly different things - tailored to what is needed in each “environment”.
But I still need to build the binary in VS2017 cause the Cordova-sqlite-storage plugin requires the architecture (i.e. x64) to be specified and ionic cordova build seems to ignore the --archs="x64" attribute.
So you think the right procedure would be the following?
ionic build --prod
ionic cordova prepare windows (EDIT: just found out that this is already called by ionic build)
Open the solution in VS2017 and build from there
This should be the right wat to build a ionic project for windows in Visual Studio, right? Works for me, at least.
Here’s some notes I have while getting my project to build with Visual Studio 2017 (as it was quite a mission)
The cordova build command looks in the registry for the MSBuild path, but since Visual Studio 2017 Microsoft doesn’t write the path in the registry anymore (more on this here) As workaround i created in the registry the following key (don’t forget to change the path):