Open JimmyDeemo opened 5 years ago
If I remove the Examples
directory then I get further in the build process but it looks like the test fail with the following error;
UserAgent.cs(26,17): error CS0234: The type or namespace name 'Mocks' does not exist in the namespace 'NUnit' (are you missing an assembly reference?) [/Users/jamesdeeman/Dev/git/JimmyDeemo_facebook-sdk-for-unity/Facebook.Unity.Tests/Facebook.Unity.Tests.csproj]
Hey @JimmyDeemo, I've been spending some time trying to get this SDK working w/ 2019.2.0f1 and ran into this same issue myself; deleting the Examples directory and restoring it after your first complete run through of setup.sh should resolve the issue, as you noted.
What version of Unity are you using? You may be running into the namespace-not-found issue because all of the .csproj files refer to the non-modularized versions of Unity's engine DLLs; to get this working w/ 2019.2.0f1 I had to manually update the .csproj files with the relevant modules for the msbuild
command to successfully build the C# code. If you're not running 2019.2 you may be having a different issue, but here's a relevant diff from my fork in case it's any use to you.
Quick follow-up: this issue may also be because of the HintPath
s referenced in the .csproj files; they're all hard-coded to a particular non-Hub Unity instance, and may need to be modified so that msbuild
can correctly locate the DLLs that Unity provides if you're using a Unity instance at a different path. You can see examples in the diff I posted above, such as:
- <HintPath>\Applications\Unity\Unity.app\Contents\Managed\UnityEngine.dll</HintPath>
+ <HintPath>$(FB_SDK_UNITY_PATH)\..\..\Managed\UnityEngine\UnityEngine.dll</HintPath>
@michael-looply Hi, in your build I notice this
Find and replace any UnityExtensions\Unity\GUISystem\UnityEngine.UI.dll references in .sln files with ../UnitySDK/Library/ScriptAssemblies/UnityEngine.UI.dll to support the new UI path with the 2019.2 UI package change.
But what is this path: ./UnitySDK/Library/ScriptAssemblies/UnityEngine.UI.dll, there is no dll file in this UnitySDK folder?
I am trying to develop a pull request to fix #291 but when I try to build the SDK I get the following error when running
setup.sh
;This stems from the fact that the Examples scripts don't compile;
Can anyone help me get up and runnign with building thie SDK? Also, could anyone explain what the setup script is doing opening a Unity project? I don't really understand the process.