Publish Ionic App Visual Studio 2015 Unexpected token


#1

1> ERROR building one of the platforms: SyntaxError Unexpected token 
1> You may not have the required environment or OS to build this project
1>MSBUILD : cordova-build error : SyntaxError: Unexpected token 
1> SyntaxError Unexpected token

i do not understand what happened

I added this file

{
“android”: {
“release”: {
“alias”: “johnS”,
“keystore”: “c:\my-release-key2.keystore”,
“keystoreType”: “”,
“password”: “”,
“storePassword”: “”
}
}
}

https://taco.visualstudio.com/en-us/docs/tutorial-package-publish-readme/


#2

This is maybe a long overdue answer, but hopefully it will save somebody some time.
Here’s what you do:

  1. Right click on your “build.json” file
  2. “Open With”
  3. Select “Binary Editor”
  4. Remove the leading dots before the opening curly brace in your file.
  5. Save
  6. Build

Worked for me