Visual Studio build failure after adding com.phonegap.plugins.facebookconnect

763 views Asked by At

I have reproduced this issue on both VS2013 & VS2015. Both are up to date with all the updates.

Steps to reproduce the problem:

  • Create a new Blank App (Apache Cordova) project.
  • Do a build and notice it all works fine.
  • Add this manually or by using the config tool.
  • Do a build and notice nothing happens. I get the error below.

I'm not sure why this is happening since no information is given to me in the error below. Any ideas on how I could get more details about the error? Or, has anyone come across this issue and fixed it? If so, how?

1>------ Build started: Project: Twelve, Configuration: Debug Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(96,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> GeneratedJavascript=
1> D:\Documents\Visual Studio 2013\Projects\Mobile\Twelve\Twelve>call "C:\Program Files (x86)\nodejs\"\nodevars.bat
1> Your environment has been set up for using Node.js 0.10.33 (ia32) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\aulzf2r2.xwq\packages\vs-mda
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

2

There are 2 answers

1
hasandogu On

Sorry, I cannot add this as a comment but go to Tools > Options > Projects and Solutions > Build and Run and set MSBuild project build output verbosity to Detailed or Diagnostic. You should be able to see the error.

I have just installed the same plugin 0.11.0 and I am getting the following error.

3>  TypeError: Cannot use 'in' operator to search for 'APP_ID' in undefined (TaskId:22)
3>Done executing task "MdaVsCli" -- FAILED. (TaskId:22)
3>Done building target "BuildMDA" in project "XXXX.jsproj" -- FAILED.: (TargetId:14)

I have the APP_ID defined as the plugin page mentions and configured it like it is mentioned on MSDN page for Manage Plugins for Apps Built with Visual Studio Tools for Apache Cordova but nothing seemed to help.

Still trying to find my problem out about it but I hope this helps with your problem.

0
Chuck Lantz On

Unfortunately, due to a Cordova issue, you can run into problems with plugin variables in Cordova < 5.0.0. Plugin variable information is lost if you install the "plugin" be fore the "platform" which can happen depending on your workflow. They do, however, function in Cordova 5.0.0 which you can use with VS 2015 RC. To update to 5.0.0 and use plugin variables, you will need to update your VS project and use the command line.

  1. Remove the plugins with the variables via the config designer.
  2. Update to Cordova 5.0.0 via the config designer (Platforms > Cordova CLI)
  3. From the command line:
    1. Go to your project directory.
    2. Type the following substituting the plugin name for the plugin you wish to add:
    3. npm install -g cordova
    4. cordova plugin add nl.x-services.plugins.launchmyapp --variable URL_SCHEME=myscheme

This issue is actively being worked so things should improve in the future. You will also want to take note of the additional known issues pertaining to 5.0.0 when using it.

https://www.visualstudio.com/explore/cordova-known-issues-vs

You will also want to note the bug reported for the Facebook for the Cordova plugin registry when building for iOS. This will also likely cause issues with VS due to the NTFS file-system on Windows. Here's a possible fix for this problem:https://github.com/Chuxel/taco-tricks/tree/master/ios-plugin-symlink-fix