Using ZXing with Hololens - unity3d

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.

Related

Firebase Database in Unity with REST API

I am trying to create a connection to the Firebase Realtime Database by following this tutorial: https://medium.com/#rotolonico/firebase-database-in-unity-with-rest-api-42f2cf6a2bbf to understand how it works and modify as I go. However, I am getting the following errors (these are just some of the errors):
Assembly DLL name is reserved for internal use: Assets/UnityEngine.dll (did files generated by a build accidentally end up in your Assets/ folder?)
C:\Program files\2019.4.20f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\FontData.cs(135,16): error CS0433: The type 'TextAnchor' exists in both 'UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'`
C:\Program Files\2019.4.20f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\InputField.cs(241,10): error CS0433: The type 'SerializeField' exists in both 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
These errors are populating when I did the following steps:
Navigate to the Build Files (DLL) folder.
Open CommonData.csproj in your favorite text editor.
Change the UnityInstallFolder value on line 6 to point to your Unity installation directory
On OSX this is likely /Applications/Unity/Editor
On Windows this is likely C:\Program Files (x86)\Unity\Editor
Double click FullSerializer.sln to open up the solution
Run a build-all (F6 in visual studio). Alternatively, you can right-click any of the three projects to build only one of them.
FullSerializer - NoUnity builds Full Serializer so that you can use it outside of Unity.
FullSerializer - Unity builds Full Serializer to a DLL
FullSerializer - Unity - WinRT builds Full Serializer with WinRT APIs (if you're targeting the Windows Store or the Windows Phone export platforms)
You will find the DLLs inside of the Build folder. Please add them to your Unity project's Asset folder.
Here is the path where unity is installed:
C:\Program Files\2019.4.20f1\Editor
I opened the FullSerializer.sln, and build one of the three projects, and so on.
I am not sure what I am doing wrong. Any help would be appreciated.
I was able to determine the issue. It appears that although the instruction suggests adding the source folder in the assets folder of the Unity Project, I remove it from there and put it in the same level as the assets folder. That resolved the issue. Hope this helps anyone else who has encountered this issue.

visual studio 2017 large Build error (for hololens build)

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".

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)

Get-PnPProvisioning Template Error - SharePoint 2016

I am trying to extract the data using the SharePointPnPPowerShell2016 module.
When I call Get-PnPProvisioningTemplate it start to run, it goes through some of the settings Regional Settings, Supported UI Languages, Audit Settings, Site Security, Fields, Content Types, but then throws an error
Message :Could not load type 'Microsoft.SharePoint.Client.DocumentSet.DocumentSetTemplate' from assembly 'Microsoft.SharePoint.Client.DocumentManagement, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.
StackTrace : at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectContentType.GetEntities(Web web, PnPMonitoredScope scope, ProvisioningTemplateCreationInformation creationInfo, ProvisioningTemplate template)
at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectContentType.ExtractObjects(Web web, ProvisioningTemplate template, ProvisioningTemplateCreationInformation creationInfo)
at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.GetRemoteTemplate(Web web, ProvisioningTemplateCreationInformation creationInfo)
at Microsoft.SharePoint.Client.WebExtensions.GetProvisioningTemplate(Web web, ProvisioningTemplateCreationInformation creationInfo)
at PnPVSExtract_cj.Program.Main(String[] args) in c:\users\a0721713\documents\visual studio 2015\Projects\PnPVSExtract_cj\PnPVSExtract_cj\Program.cs:line 66
Date :11/14/2016 4:56:31 PM
I am running another environment with very similar set up, and it progress to List Instances and runs without problems.
Any ideas would help!
I have seen that error when a outdated version of the CSOM assemblies had been installed;
try installing the latest version of the SharePoint Server 2016 Client Components SDK

DllNotFoundException in unity3d plugin for c++ dll

I am working on the Unity Plugin project and try to import the c++ native dll from c# file.
But I keep getting dllnotfoundexception.
c++ dll code:
extern "C" {
extern __declspec( dllexport ) bool IGP_IsActivated();
}
c# code:
[DllImport("mydll")]
private static extern bool IGP_IsActivated();
Dll is in place and FIle.Exists work properly. All dependent dlls are present at same hierarchy, but I still end up in dllnotfound exception.
Any help, much appreciated!!
Thanks to this Unity forum post I came up with a nice solution which modifies the PATH-environment variable at runtime:
Put all DLLs (both the DLLs which Unity interfaces with and their dependent DLLs) in Project\Assets\Wherever\Works\Best\Plugins.
Put the following static constructor into a class which uses the plugin:
static MyClassWhichUsesPlugin() // static Constructor
{
var currentPath = Environment.GetEnvironmentVariable("PATH",
EnvironmentVariableTarget.Process);
#if UNITY_EDITOR_32
var dllPath = Application.dataPath
+ Path.DirectorySeparatorChar + "SomePath"
+ Path.DirectorySeparatorChar + "Plugins"
+ Path.DirectorySeparatorChar + "x86";
#elif UNITY_EDITOR_64
var dllPath = Application.dataPath
+ Path.DirectorySeparatorChar + "SomePath"
+ Path.DirectorySeparatorChar + "Plugins"
+ Path.DirectorySeparatorChar + "x86_64";
#else // Player
var dllPath = Application.dataPath
+ Path.DirectorySeparatorChar + "Plugins";
#endif
if (currentPath != null && currentPath.Contains(dllPath) == false)
Environment.SetEnvironmentVariable("PATH", currentPath + Path.PathSeparator
+ dllPath, EnvironmentVariableTarget.Process);
}
Add [InitializeOnLoad] to the class to make sure that the constructor is run at editor launch:
[InitializeOnLoad]
public class MyClassWhichUsesPlugin
{
...
static MyClassWhichUsesPlugin() // static Constructor
{
...
}
}
With this script there is no need to copy around DLLs. The Unity editor finds them in the Assets/.../Plugins/...-folder and the executable finds them in ..._Data/Plugins-directory (where they get automatically copied when building).
Well I got it working.
For others who may face this problem, if you have more than one dll, you need to put the secondary dlls at root level of the Unity editor (e.g. C:\Program Files\Unity\Editor) and the actual referenced dll from script into plugins folder.
This worked for me.
Put the DLL(s) Unity interfaces with in Project\Assets\Wherever\Works\Best\Plugins.
Place any dependency DLLs that are not directly accessed by your scripts in Project. This will allow your program to run in the editor.
When you build, again copy the dependency DLL files, this time to the root of the build directory (right next to the generated executable). This should allow your application to load them at runtime.
(Tip: you can use Dependency Walker look at you DLLs and see what they depends on.)
I spent one day with this error. My issue was that Android doesn't get the library and always get and DDLNotFound error. My solution was:
1.- Be sure that you have the libraries for the proper architecture in the Plugins folder.
Plugins/Android/x86 and Plugins/Android/armeabi-v7a if your build settings is FAT(x86&arm)
2.- Check that Unity recognizes them as libraries. If you select them in the Project tab you should see them as a library and the platform and architecture related.
3.- After the build (don't close Unity Editor!), you can check in the Temp/StagingArea/libs if your libraries are there. If there are there for sure the libraries are going to be in the APK. As a double check, you can open your APK (change to zip extension) and see the libraries in the lib folder.
4.- In C# you should remove any lib prefix in your library name, for example:
If your library name is "libdosomething.so" you should call it as
[DllImport ("dosomething")]
I hope this work for you :)
Cheers.
Make sure the following chacklist is satisfied:
Plugins should all stay in a folder called Plugins.
The architecture your dll is built for (x86 or x86_64) must correspond to the architecture version of Unity Editor. Unity Editor 32-bit will not load 64 bit plugins and viceversa.
If you are targeting both 32 and 64 bit architectures you should put your dlls in special named folders inside the Plugins folder. The names are Plugins/x86 for 32 bit dlls and Plugins/x86_64 (x64 also works) for 64 bit dlls.
Visual C++ Redistributables must be installed. I have all from 2008.
When you build all your dlls should be copied into the root where your executable is (and again built for the correct x86/x64 architecture)
If you keep getting a namespace error it means the dll you are importing has unmanaged code and it must be wrapped into another managed dll Pugin in order to work.
These threads are a bit outdated but still relevant
DLLNotFoundException - Unity3D Plugin
Unity internal compiler error with custom dll
In my case, I have DllNotFoundException: ovrplatiformloader
Unity : DllNotFoundException: ovrplatformloader
Unity : at (wrapper managed-to-native) Oculus.Platform.CAPI.ovr_UnityInitWrapperAsynchronous(string)
Unity : at Oculus.Platform.AndroidPlatform.AsyncInitialize (System.String appId) [0x00013] in <29065e843b82403894fca6c6f2974090>:0
Unity : at Oculus.Platform.Core.AsyncInitialize (System.String appId) [0x0004f] in <29065e843b82403894fca6c6f2974090>:0
Unity : at DBHelper.Start () [0x00019] in <29065e843b82403894fca6c6f2974090>:0
My solution is:
Re-import files that doesn't work (libovrplatformloader.so)
Reconstruct the Platform/Plugins architecture. Old: Platform/Plugins/Android32/libovrplatformloader.so. New: Platform/Plugins/Android/x86/libovrplatformloader.so and Platform/Plugins/Android/armeabi-v7a/libovrplatformloader.so
Modify the import setting of libovrplatformloader.so. Change any platform to only Android platform and enable 'load on startup' selection. Choose ARMv7 CPU in armeabit-v7a while choose x86 CPU in x86 folder.
just put the dlls under Plugins folder and that works for me
I was having the same issue, and the solutions described here didn't work.
I think my case was a little different.
I think that the .dll I was importing depended on other .dll files. So I imported the other files related to that .dll (which I thought were unnecessary since I am not calling them directly on c# code) and that solved the issue.