Error when using Microsoft Advertising SDK in Windows 8 / Windows 8.1 projects
After updating my Windows 8 app to Windows 8.1 I got a compilation error saying:
"The .winmd file 'Microsoft.Advertising.WinRT.UI.winmd' contains duplicate type names.
Type 'Microsoft.Advertising.WinRT.UI.AdControl' is already registered with the in-process
server 'CLRHost.dll'. ListWee_W8_Tests"
For me, this occurred in the test project.
After scouring the web I found a few solutions but most of them seemed like hacks, and I feared I would have to revert them later on if I used them now.
The easy solution
The easiest solution for me was to just add a reference to the Microsoft Advertising SDK in the test project.
After that the compilation works and there’s no need for more hacks 🙂