22 November 2015

Windows AdDuplex NuGet support

The best way to integrate AdDuplex into your project is through NuGet system, and not Visual Studio Gallery on MSDN.

This prevent Visual Studio Designer from Unhandled Exceptions.

So, if you already added Reference on installed AdDuplex support from Visual Studio Gallery on MSDN, remove it, and add corresponding NuGet packages for AdDuplex support.

Then in Windows 10 Universal project:

Add a namespace declaration to your page
xmlns:adduplex="using:AdDuplex"

Add an AdControl to your page:
< adduplex:AdControl AdUnitId="xxxxxx" AppKey="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />

Then in Windows 8.1 Store project:

Add a namespace declaration to your page:
xmlns:adduplex="using:AdDuplex.Universal.Controls.Win.XAML"

Add an AdControl to your page:
< adduplex:AdControl AdUnitId="xxxxxx" AppKey="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />

Then in Windows 8.1 Phone project:

Add a namespace declaration to your page:
xmlns:adduplex="using:AdDuplex.Universal.Controls.WinPhone.XAML"


Add an AdControl to your page:
< adduplex:AdControl AdUnitId="xxxxxx" AppKey="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />

Happy coding !


           

No comments: