Advertisment.dll Not Foun

Hi Guys!
I’m struggling with this for a while now…
I’m having this compilation erros, and i cant do anything with my project…
The Platform is Set to Android, Services Are ON, (Have turned them on and off several times)
I’ve also deleted lybrary folders, reopened proyect, Refresh/Reimport All. but nothing seems to work…
I’m un Unity 2017, and the UnityAds libraries are not being builded.

i was checking unityads package on asset store, but it says that from unity 5.5 and forwards its not needed, the dlls should be supossed to be with the project…

I have also checked Enable Built-in Ads Extension under Advanced settings on Ads.

Any help with this would be really appreciated.
Thanks in advance!


Which platform are you compiling for? Ads dll is only included on Android and iOS, so for other platforms you need to check for UNITY_ADS conditional, see example on https://docs.unity3d.com/ScriptReference/Advertisements.Advertisement.Show.html

/Rasmus

1 Like

I’m Compiling for Android.
But i’m using the same code that works in other proyects, and on those projects when i call showvideo, i see the placeholder of unity “Ad here”.
With this project now i have FileNotFoundException: Could not load file or assembly ‘UnityEngine.Advertisements, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.

If you open the “Ads” panel in Services Window, is the “Enable built-in ads extension” enabled? Alternatively take a look at the troubleshooting section of Issues with Ads from Services window? Missing assemblies? - look here

Let us know if this helps.

/Rasmus

Yup, i have Enable Built-in Ads Extensions.
I’ve done the same i did yesterday 500 times.
Went to my project folder, Deleted Everyting except my “Assets” folder (Temp / Library / Project Settings / VS Solution Files / csproj, etc)
Then reopened the project in unity 2017.1.1f1, waited for it to reimport everything,
Then i did what you told me (Used UNITY_ADS symbol on my unity ads class) when i was free of compilation errors, switched platform to android, and then Re-Enabled Unity ads from services tab.
And now it seems to be working…

At least i was able to do Advertisement.Initialize(gameId, true);

Hope if anyone gets into this problem this post might help.

Thanks Rasmus!

Good to hear you got it working. I assume deleting ProjectSettings folder did the change, since UnityConnectSettings.asset then got re-generated. However could also imagine that it required a lot of reconfiguration of your project? :slight_smile:

/Rasmus

luckily pretty few reconfiguration. package name, scenes build order, and not much more :slight_smile:
Oh… and Precompile Symbols! hahahah

I have a similar problem - Unity 2017.1.1f1

I keep getting this error, despite my network connection working:
UnityConnectOrganizationRequest: Timed out while fetching orgs - please check your network connection

Services works very unstable, however not necessarily linked to above error (works sometimes, even if it logs the error)
I get a lot of time outs and have to relink the project

The Advertisment DLL is not found and hence I get compile errors, impossible to work on project
using UnityEngine.Advertisements; ----> not found

I have tried the above, deleting all but MY ASSETS and rebuilding everything without success.

This is how UnityAdsSettings looks:
UnityAdsSettings:
m_Enabled: 1
m_InitializeOnStartup: 0
m_TestMode: 0
m_EnabledPlatforms: 4294964991
m_IosGameId:
m_AndroidGameId:
m_GameIds:
AndroidPlayer: XXXXXX
iPhonePlayer: XXXXX
m_GameId: XXXXX

Edit:
I followed the instructions from

Still not working