visual studio 2017 large Build error (for hololens build) - unity3d

Sort of fix:
I changed the scripting backend in the player settings from .net to IL2cpp.
Now I can at least build the project.
Software:
Unity 2017.3.1f1
Universal windows platform
Holotoolkit
Visual studio 2017 15.6.1
Problem:
I try to build my solution on the hololens and get the following error:
Severity Code Description Project File Line Suppression State
Error The command ""D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Unity\Tools\AssemblyConverter.exe"
-platform=uap -lock="D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\project.lock.json"
-bits=32 -configuration=Release -removeDebuggableAttribute=False -uwpsdk=10.0.16299.0 -path="." -path="D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Players\UAP\dotnet\x86\Release"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.TextRenderingModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.TerrainPhysicsModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.TerrainModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.TilemapModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.UIElementsModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.SharedInternalsModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.ScreenCaptureModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.SpriteMaskModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.StyleSheetsModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.SpriteShapeModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.VideoModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.VehiclesModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.UnityWebRequestWWWModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.VRModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.WindModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.WebModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.UnityAnalyticsModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.UNETModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.UIModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.UnityConnectModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.UnityWebRequestTextureModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.UnityWebRequestModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.UnityWebRequestAudioModule.dll" "D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.AudioModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.AssetBundleModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.ARModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.ClothModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.DirectorModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.CrashReportingModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.CoreModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\Assembly-CSharp.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.AccessibilityModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.AnimationModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.AIModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.ParticlesLegacyModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.JSONSerializeModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.ParticleSystemModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.PhysicsModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.Physics2DModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.PerformanceReportingModule.dll" "D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.GridModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.GameCenterModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.InputModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.IMGUIModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.ImageConversionModule.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\Newtonsoft.Json.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.Timeline.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\nunit.framework.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.UI.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.SpatialTracking.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.Analytics.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.HoloLens.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.StandardEvents.dll"
"D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\UnityEngine.Networking.dll""
exited with code
3. Heinen_en_Hopman_Hololen_Aplication D:\bewijzenmap\Stage\AR_Productions\Hololens_projects\Heinen-En-Hopman\Heinen&Hopman_Hololen_Aplication\Builds\painttest\Heinen_en_Hopman_Hololen_Aplication\Heinen_en_Hopman_Hololen_Aplication.csproj 434

Try to delete the entire output folder and rebuild the solution. Remember to check the "Unity C# project" check and "Copy reference".

Related

Error in Build After InAppPurchase Unity

CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
C:/Program Files/Java/jdk1.8.0_161\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/Sabasoft Developer/Downloads/tools_r25.2.3-windows\tools" -Dfile.encoding=UTF8 -jar "D:\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
]
stdout[
Warning: [Temp\StagingArea\AndroidManifest-main.xml:12, D:\unity projects\Pizza maker\Temp\StagingArea\android-libraries\GooglePlay\AndroidManifest.xml:3] Main manifest has but library uses targetSdkVersion='24'
]
exit code: 1
Update Java SdK
Update Android SdK
Check target in menifest file and Unity editor. Both should be same.
Remove duplicate .jar under plugins folder if there are any.
You are using a library somewhere in your code (possibly something for GooglePlay?). The library has a manifest.xml file that is likely located in a folder called plugin or one of its subfolders.
The manifest is the file used by android to describe the app: how it starts, what permissions it has, and so on.
Any android project in unity will include a default manifest.xml file. This file is edited by unity with some info relative to you game (the name, and the target version, are part of it).
Now, the libraries you include in your project might need different options and values in the manifest, so Unity libraries for android usually come with another manifest.xml file. This will will be automatically merged with the default one by unity at build time.
Usually, it goes well, the additional line in the manifest from the library get added to the default manifest.
But in your case, there is a conflict between these manifests. The target version is specified both in the library and in your project. So unity can't resolve it.
To fix this, use a target version for your project that is the same or higher than the one of the library. Edit your target version under player settings

Using ZXing with Hololens

I've been trying to use Zxing on the Hololens but as soon as the app starts on the device, I get a fileloadException when this line is called:
BarcodeReader barcodeReader = new BarcodeReader();
FileLoadException: Could not load file or assembly 'System.Core,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040) at
ZXing.BarcodeReader..ctor() at Decoder.Start() at
Decoder.$Invoke1(Int64 instance, Int64 args) at
UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64
args, IntPtr method) (Filename: Line: 0).
I have the Unity 2018.1.0b5 beta version with Visual Studio 2017 on Windows 10.
The Building works perfectly so the library is found.
Here's how I import ZXing library :
I've read all the other topics I found on it but the solutions provided do not work. I also tried to use the Zxing.winmd but the dll can't be found then.
Did I miss a step ? A file to download maybe ?
Thanks for your help !
After many configurations tried, I finally managed to use Zxing on Hololens by switching the scripting Backend in Player Settings to Il2Cpp. I was using .net (for the scripting backend) which caused me most of the errors. Il2CPP
If you don't have the IlCPP proposition, you might need to relaunch the Unity installer, making sure that "Windows Store Il2CPP " is checked.installation
I also downgraded my version of unity to 2017 in order to use the Holotoolkit which wasn't working on my 2018 beta version.
This way I don't need any specific settings to import Zxing in the Assets. Also, I didn't use Zxing.winmd but Zxing.unity.
settings Zxing
Tips : don't forget to unable the webcam and to deploy it in Visual Studio with "Release", otherwise it's going to slow down your app.
If Visual Studio doesn't find your Zxing.unity file, right click on your project in the Solution's Explorer (of Visual Studio) : Add->Reference->Find your Zxing.unity.

TypeInitializationException accessing MonoGame GraphicsAdapter.Adapters, could not load type 'SharpDX.Rectangle'

Converting VB code from XNA 3.1 to MonoGame.
Any attempt to access class GraphicsAdapter throws the exception below. For example, trying to enumerate GraphicsAdapters. On this line:
For Each adapter As GraphicsAdapter In GraphicsAdapter.Adapters
Result is an exception:
System.TypeInitializationException occurred
HResult=-2146233036
Message=The type initializer for 'Microsoft.Xna.Framework.Graphics.GraphicsAdapter' threw an exception.
Source=MonoGame.Framework
TypeName=Microsoft.Xna.Framework.Graphics.GraphicsAdapter
StackTrace:
at Microsoft.Xna.Framework.Graphics.GraphicsAdapter.get_Adapters()
at ...my code...
InnerException:
HResult=-2146233054
Message=Could not load type 'SharpDX.Rectangle' from assembly 'SharpDX, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1'.
Source=MonoGame.Framework
TypeName=SharpDX.Rectangle
StackTrace:
at Microsoft.Xna.Framework.Graphics.GraphicsAdapter.CreateAdapter(Adapter1 device, Output monitor)
at Microsoft.Xna.Framework.Graphics.GraphicsAdapter.PlatformInitializeAdapters(ReadOnlyCollection`1& adapters)
at Microsoft.Xna.Framework.Graphics.GraphicsAdapter..cctor()
Note the inner exception:
Could not load type 'SharpDX.Rectangle' from assembly 'SharpDX, ...Version=4.0.1.0, ...
The project references these assemblies (among others):
MonoGame.Framework version=3.6.0.1625
from NuGet "MonoGame.Framework.WindowsDX", file
packages\MonoGame.Framework.WindowsDX.3.6.0.1625\lib\net40\MonoGame.Framework.dll
SharpDX version=4.0.1.0
SharpDX.Direct2D1 version=4.0.1.0
SharpDX.Direct3D9 version=4.0.1.0
SharpDX.DXGI version=4.0.1.0
SharpDX.Mathematics version=4.0.1.0
So I don't see why it would fail this way.
What could be wrong? Not compatible with this SharpDX version?
NOTE: These are all up-to-date packages from NuGet, in Visual Studio 2015. Targeting .Net 4.5.2.
UPDATE
To prove it isn't a problem with SharpDX, I put this line before that GraphicsAdapter line:
Dim testRect As SharpDX.Rectangle = New Rectangle()
This successfully created testRect. No Exception until attempt to access GraphicsAdapter. Also tried all the other Shared (static) properties of GraphicsAdapter, such as GraphicsAdapter.DefaultDevice. Any one fails with same exception.
I posted the same question to MonoGame forums:
http://community.monogame.net/t/solved-typeinitializationexception-accessing-graphicsadapter-adapters-could-not-load-type-sharpdx-rectangle/9803
Cause of problem:
Current release of MonoGame.Framework for WindowsDX (Windows OS + DirectX drivers), 3.6.0.1625 is built against SharpDX 2.6.3, and is not compatible with more recent SharpDX versions.
(Interim) Solution:
The developer branch of MonoGame does target the current SharpDX. Builds can be obtained from MonoGame's teamcity (free registration required).
Tested MonoGame.Framework build 3.7.0.994; it worked with SharpDX 4.0.1:
http://teamcity.monogame.net/viewLog.html?buildId=56483&tab=artifacts&buildTypeId=MonoGame_PackagingWindows
That build installs most SharpDX dlls to
C:\Program Files (x86)\MonoGame\v3.0\Assemblies\Windows
However, SharpDX.Mathematics.dll is currently missing,
so I still install SharpDX from NuGet, rather than using those.
Standard location for MonoGame releases:
(look for at least 3.7, which is not there yet, as I write this):
http://www.monogame.net/downloads/
(If instead of NuGet packages for MonoGame and SharpDX, I had downloaded MonoGame 3.6 installer and used its version of SharpDX dlls at C:\Program Files (x86)\MonoGame\v3.0\Assemblies\Windows, then I would not have had this incompatibility. However, that was not recent enough SharpDX for my purposes. This should be resolved by release of MonoGame 3.7)

Cannot get Cordova project building in VS2015 with the facebook connect plugin

I've tried everything, but cannot seem to get it working. I've done the following:
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
But I still cannot build. Here is the detailed output from MSBUILD :
http://pastebin.com/7enSzCxs
And a highlight of some of the errors I'm getting
1> BUILD FAILED
1> C:\Users\Adam\AppData\Local\Android\android-sdk\tools\ant\build.xml:601: The following error occurred while executing this line:
1> F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\com.phonegap.plugins.facebookconnect\myapp2568ddfac877478fb806edc911cff37e-FacebookLib\custom_rules.xml:4: F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\com.phonegap.plugins.facebookconnect\myapp2568ddfac877478fb806edc911cff37e-FacebookLib\ant-build does not exist.
And
1> BUILD FAILED
1> C:\Users\Adam\AppData\Local\Android\android-sdk\tools\ant\build.xml:470: The following error occurred while executing this line:
1> C:\Users\Adam\AppData\Local\Android\android-sdk\tools\ant\build.xml:441: Unable to delete directory F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\com.phonegap.plugins.facebookconnect\myapp2568ddfac877478fb806edc911cff37e-FacebookLib\bin
And finally
1>
1> F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\cordova\node_modules\q\q.js:126
1> throw e;
1> ^
1> Error code 1 for command: cmd with args: /s /c "ant debug -f F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\build.xml"
1> Command finished with error code 8: F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\cordova\build.bat --debug,--ant,
1>MDAVSCLI : error : F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\cordova\build.bat: Command failed with exit code 8
1>Done executing task "MdaVsCli" -- FAILED.
1>Done building target "BuildMDA" in project "fbtest.jsproj" -- FAILED.
1>Build FAILED.
Any ideas at all? Using a fresh install of VS2015 with the tools for cordova, trying to build for android.
EDIT:
So after taking the advice of Kamil Pajdzik below, I used build.bat to compile it and found some issues with my path being waaay to long. I mapped a drive to cut down the length and it will now build AOK from the build.bat.
Still no dice in Visual studio though (I assume this is difference between build.bat using gradle and vs using ant).
My only error now is :
1> -code-gen:
1> [mergemanifest] Merging AndroidManifest files into one.
1> [mergemanifest] Manifest merger disabled. Using project manifest only.
1> [echo] Handling aidl files...
1> [aidl] No AIDL files to compile.
1> [echo] ----------
1> [echo] Handling RenderScript files...
1> [echo] ----------
1> [echo] Handling Resources...
1> [aapt] Generating resource IDs...
1> [aapt] Z:\fbtest\platforms\android\bin\AndroidManifest.xml:14: error: Error: No resource found that matches the given name (at 'value' with value '#string/fb_app_id').
1> [aapt]
1> [aapt] Z:\fbtest\platforms\android\bin\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at 'label' with value '#string/fb_app_name').
1> [aapt]
1>
1> BUILD FAILED
1> C:\Users\Adam\AppData\Local\Android\android-sdk\tools\ant\build.xml:653: The following error occurred while executing this line:
1> C:\Users\Adam\AppData\Local\Android\android-sdk\tools\ant\build.xml:698: null returned: 1
1>
Okay, this appears to be the issue. There are two problems. The first is a max path size issue on Windows. The issue is that it the plugin uses part of the the app's ID to create a folder, and VS by default uses a random identifier that is fairly long so this exacerbates the issue.
To resolve:
Update the ID for your project to something short (com.myproject.short)
Move the project to the root of your drive
Go to the project folder and re-add the android platform. From the command line:
cordova platform remove android
cordova platform add android
The second issue that then remains is an "Ant" build seems to be missing a folder which likely is a bug. If you add the "ant-build" folder in the location it complains about the build succeeds.
Also - Be sure plugins/fetch.json is included in your checkins since this is where your plugin variables are stored. If that file is deleted, you'll need to remove and re-add the plugin again. From your update it sounds like either VS is still set to use Cordova 4.3.0 and/or plugins/fetch.json does not contain your plugin variables. You should see something like this if the plugin was added using Cordova 5.0.0:
{
"com.phonegap.plugins.facebookconnect": {
"source": {
"type": "registry",
"id": "com.phonegap.plugins.facebookconnect"
},
"is_top_level": true,
"variables": {
"APP_ID": "123",
"APP_NAME": "nbaer"
}
}
}
The "variables" section is what may be missing.
Try running F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\cordova\build.bat from a command line. It usually gives more information.
Cordova 5.0.0 requires Android SDK in version 22. You can check if you have that installed via SDK manager.
This particular plugin appears to have some challenges with Cordova 5.0.0. Android underwent significant changes in this release that may be causing issues.
https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1010
I am seeing failures if you build either with Ant or Gradle using a pure Cordova command line interface project. Likely a plugin fix is required to resolve the issue. I reccomend adding comments to this defect to help the plugin author resolve the issue.
So thanks to Chucks help, I managed to get a build working. It was indeed a combination of path length exceeding 260 characters (which I solved by mapping my solution directory to a drive) and a couple of folders not being created.
They were in my case :
F:\Git\CordovaFb\FBTest\platforms\android\com.phonegap.plugins.facebookconnect\myapp7a29c6c80cee4b2aa0dc8a70dc57527d-FacebookLib\bin\classes
and
F:\Git\CordovaFb\FBTest\platforms\android\com.phonegap.plugins.facebookconnect\myapp7a29c6c80cee4b2aa0dc8a70dc57527d-FacebookLib\ant-build
I seem to have to manually recreate these from time to time as they get deleted on some builds...
So the full process is as follows (for others who have the same issue)
1) Create your solution in as short a path as possible (map a drive if you need to)
2) Add your cordova project to the solution, double click config.xml, goto platforms and change the CLI version to 5.0.0
3) Fire up a command prompt in the solutions root
4) Type the following cordova plugin add https://github.com/Wizcorp/phonegap-facebook-plugin.git --variable APP_ID="00000000" --variable APP_NAME="My App"
5) When its done you'll have the plugin in the plugins dir and the fetch.json file should contain the variables you entered for appid and appname
6) Do a full build and you'll get some errors (Exit code 8)
7) Manually create the following :
[Solution Route]\platforms\android\com.phonegap.plugins.facebookconnect\myapp7a29c6c80cee4b2aa0dc8a70dc57527d-FacebookLib\bin\classes`
and
[Solution Route]\platforms\android\com.phonegap.plugins.facebookconnect\myapp7a29c6c80cee4b2aa0dc8a70dc57527d-FacebookLib\bin\classes`
8) Your build should succeed! Check periodically if those paths still exist.
This should get you by until the next release of the cordova tools for VS (if they fix it)
platforms\android\AndroidManifest.xml
just change android:minSdkVersion="14" to android:minSdkVersion="15"

Type or Namespace "Dapper" could not be found: in Hangfire Source code in Visual Studios?

I've imported the Hangfire Source code from Github into my existing VS 2013 solution. When I attempted to build all projects within my solution, I get several errors:
Error 6 The type or namespace name 'Dapper' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Jerry_Dev\Documents\GitHub\Hangfire\src\Hangfire.SqlServer\SqlServerDistributedLock.cs 20 7 Hangfire.SqlServer
In Package Manager, when I do: "Install-Package Dapper", it says
'Dapper 1.38' already installed.
Hangfire.SqlServer already has a reference to 'Dapper 1.38'.
I see Dapper dot net installed in my Manage Nuget Packages Window in my Hangfire.SqlServer project
We don't store the packages folder under source control to reduce the source code size. Hangfire uses Automatic Package Restore in Visual Studio instead of obsolete MSBuild-integrated package restore. The Automatic Restore downloads missing packages automatically on each build, but it works only with NuGet ≥ 2.7, so you have the following options:
Update NuGet to the latest version
Please see the official docs.
Run the build script
Go to the root Hangfire directory and run the build.bat file. It will automatically restore all the missing packages.