I have compiled https://github.com/Microsoft/unityplugins but when I import the created package: Microsoft.UnityPlugins.Advertising.unitypackage it imports the same dll 4 times in different subfoldes: If I tryu to build, I get the following error: Code (CSharp): Plugin 'Microsoft.UnityPlugins.Advertising.dll' is used from several locations: Assets/Plugins/WSA/x64/Microsoft.UnityPlugins.Advertising.dll would be copied to <PluginPath>/Microsoft.UnityPlugins.Advertising.dll Assets/Plugins/WSA/x86/Microsoft.UnityPlugins.Advertising.dll would be copied to <PluginPath>/Microsoft.UnityPlugins.Advertising.dll Assets/Plugins/Microsoft.UnityPlugins.Advertising.dll would be copied to <PluginPath>/Microsoft.UnityPlugins.Advertising.dll Assets/Plugins/WSA/ARM/Microsoft.UnityPlugins.Advertising.dll would be copied to <PluginPath>/Microsoft.UnityPlugins.Advertising.dll Plugin 'Microsoft.UnityPlugins.Common.dll' is used from several locations: Assets/Plugins/WSA/x64/Microsoft.UnityPlugins.Common.dll would be copied to <PluginPath>/Microsoft.UnityPlugins.Common.dll Assets/Plugins/WSA/ARM/Microsoft.UnityPlugins.Common.dll would be copied to <PluginPath>/Microsoft.UnityPlugins.Common.dll Assets/Plugins/WSA/x86/Microsoft.UnityPlugins.Common.dll would be copied to <PluginPath>/Microsoft.UnityPlugins.Common.dll Please fix plugin settings and try again. UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions(String) UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Check their settings in Plugin Inspector. Make sure they are set to be compatible only with their respective platforms/archs etc and all have placeholders set properly.
I'm not 100% shure how compile the platforms correctly. If I'm right, on \Plugins\***.dll I should select Editor only: The other three are all set to WSAPlayer only: \Plugins\WSA\ARM\***.dll \Plugins\WSA\x64\***.dll \Plugins\WSA\x86\***.dll For example, for x64 if I select Placeholder, I see the following options. What should I choose? I'm building for Windows 10 Universal.
The placeholder must be a dll that is compatible with the editor, usually the one you place in Plugin directory directly.
If I set the following configuration in the three dlls under: \Plugins\WSA\ARM\***.dll \Plugins\WSA\x64\***.dll \Plugins\WSA\x86\***.dll I get the following errors: Code (CSharp): Plugin 'Microsoft.UnityPlugins.Advertising.dll' is used from several locations: Assets/Plugins/WSA/x64/Microsoft.UnityPlugins.Advertising.dll would be copied to <PluginPath>/Microsoft.UnityPlugins.Advertising.dll Assets/Plugins/WSA/x86/Microsoft.UnityPlugins.Advertising.dll would be copied to <PluginPath>/Microsoft.UnityPlugins.Advertising.dll Assets/Plugins/WSA/ARM/Microsoft.UnityPlugins.Advertising.dll would be copied to <PluginPath>/Microsoft.UnityPlugins.Advertising.dll Please fix plugin settings and try again. UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions(String) UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25) UnityEditor.HostView:OnGUI()
They're all managed DLLs. You only need one of them. Just keep either x64 or ARM one and delete the other ones.
you guys ever get this working? Having same issue. Not sure why they wouldnt just release the unity package instead having to go through all this.
I managed to make it work yesterday following the instructions given on the website https://github.com/Microsoft/unityplugins to create Microsoft.UnityPlugins.Advertising.unitypackage and keeping only one managed DLL (the ARM one) as advised above by Tautvydas Zilys. Then to display ads on devices, you need to include the file https://github.com/Microsoft/unityp...outWin10/VideoAdsSample/MicrosoftAdsBridge.cs in your build and add the following line in the InitializeUnity function located in the App.xaml.cs file : Code (CSharp): Microsoft.UnityPlugins.MicrosoftAdsBridge.InterstitialAdFactory = new Microsoft.UnityPlugins.MicrosoftAdsFactory(); However, I hoped that there was an easier way to get there and as I want to display a banner ad and not a video ad I guess I'm not done with headaches yet...
Well done Eze... I have NOT been able to get a build from Unity to work following the above instructions. 1. I have used the unityplugin from https://github.com/Microsoft/unityplugins 2. I have successfully created the unitypackage following those instructions 3. I have successfully imported the package into the sample VideoAdsSample from https://github.com/Microsoft/unityplugins 4. I kept only the ARM folder as per the above Tautvydas Zilys instructions 4. I have changed the Plugins / Microsoft.UnityPlugins.Advertising.dll from "Any Platform" to "Editor" 5. The ARM folder Microsoft.UnityPlugins.Advertising.dll is set to WSAPlayer and Placeholder is set to either "none" or to the Microsoft.UnityPlugins.Advertising.dll in the Plugins folder. When I build as either a Universal 8.1 or 8.1 I get the same 2 error Two errors are as follows: Error building Player: UnityException: Failed to run reference rewriter with command --target="Temp\StagingArea\VideoAdsSample.Windows\Microsoft.UnityPlugins.Advertising.dll" --additionalreferences="Temp\StagingArea\VideoAdsSample.Windows" --platform="C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd" --support="Temp\StagingArea\VideoAdsSample.Windows\WinRTLegacy.dll" --supportpartialns=Unity.Partial --system=System --dbg=pdb --framework="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1" --alt=System.Xml.Serialization --ignore=System.IConvertible,mscorlib. Catastrophic failure while running rrw: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Microsoft.Advertising, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null' at Unity.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters) at Unity.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name) at Mono.Cecil.MetadataResolver.Resolve(TypeReference type) at Mono.Cecil.TypeReference.Resolve() at Unity.ReferenceRewriter.RewriteTypeReferences.Visit(TypeReference type, String referencingEntityName) at Unity.ReferenceRewriter.ReferenceDispatcher.Visit(TypeReference type, String referencingEntityName) at Unity.ReferenceRewriter.ReferenceDispatcher.DispatchFields(TypeDefinition type, String referencingEntityName) at Unity.ReferenceRewriter.ReferenceDispatcher.Dispatch(TypeDefinition type) at Unity.ReferenceRewriter.ReferenceDispatcher.Dispatch() at Unity.ReferenceRewriter.RewriteTypeReferences.Run() at Unity.ReferenceRewriter.RewriteOperation.Execute(RewriteContext context) at Unity.ReferenceRewriter.Program.Main(String[] args) ======================== UnityException: Failed to run reference rewriter with command --target="Temp\StagingArea\VideoAdsSample.Windows\Microsoft.UnityPlugins.Advertising.dll" --additionalreferences="Temp\StagingArea\VideoAdsSample.Windows" --platform="C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd" --support="Temp\StagingArea\VideoAdsSample.Windows\WinRTLegacy.dll" --supportpartialns=Unity.Partial --system=System --dbg=pdb --framework="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1" --alt=System.Xml.Serialization --ignore=System.IConvertible,mscorlib. Catastrophic failure while running rrw: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Microsoft.Advertising, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null' at Unity.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters) at Unity.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name) at Mono.Cecil.MetadataResolver.Resolve(TypeReference type) at Mono.Cecil.TypeReference.Resolve() at Unity.ReferenceRewriter.RewriteTypeReferences.Visit(TypeReference type, String referencingEntityName) at Unity.ReferenceRewriter.ReferenceDispatcher.Visit(TypeReference type, String referencingEntityName) at Unity.ReferenceRewriter.ReferenceDispatcher.DispatchFields(TypeDefinition type, String referencingEntityName) at Unity.ReferenceRewriter.ReferenceDispatcher.Dispatch(TypeDefinition type) at Unity.ReferenceRewriter.ReferenceDispatcher.Dispatch() at Unity.ReferenceRewriter.RewriteTypeReferences.Run() at Unity.ReferenceRewriter.RewriteOperation.Execute(RewriteContext context) at Unity.ReferenceRewriter.Program.Main(String[] args) PostProcessWinRT.RunReferenceRewriter () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:566) PostProcessUniversal81.RunReferenceRewriter () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUniversal81.cs:123) PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:123) PostProcessUniversal81.Process () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUniversal81.cs:42) UnityEditor.Metro.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:133) UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316) UnityEditor.HostView:OnGUI() Tautvydas Zilys or anyone at Unity can you provide some help please. Thank you
Well, I believe that is what is in the plugin folder. It is the Microsoft.UnityPlugins.Advertising.dll. Where do you see in the error message that it cannot find a Microsoft.Advertising?
This part of error: Catastrophic failure while running rrw: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Microsoft.Advertising, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null' Which I believe is one more dll/winmd file.
Microsoft.UnityPlugins.Advertising.dll is the one you had a failure with, because it references Microsoft.Advertising.dll. So place Microsoft.Advertising.dll alongside the Microsoft.UnityPlugins.Advertising.dll (the one used for WSA) and also set plugin settings for that dll to be WSA-only.
hey so I downloaded that package but it looks like the package is not complie to use in Unity. So i have to do some additional build inVS to get all the needed DLLs. its said that some powershall is needed.. well Iam so confused
This asset store package should make things easier https://www.assetstore.unity3d.com/en/#!/content/54715
@TGKG I basically have the very same issue as you had. I found a Microsoft.Advertising.dll (which on did you use? I only found one in an x86 Folder) and this doesn't help - very same issue. Could you walk me through? Which dll and what settings in which UnityFolder? Thanks!
kindly tell me how i can use this plugin for uwp ip2cpp backend build i want to implement the ads kindly guide me