Thursday, August 28, 2014

Resolve the “‘Microsoft.Advertising.WinRT.UI.winmd’ contains duplicate types names”

Error 1 The .winmd file 'Microsoft.Advertising.WinRT.UI.winmd' contains duplicate type names. Type 'Microsoft.Advertising.WinRT.UI.XamlAdControl_XamlTypeInfo.XamlMetaDataProvider' is already registered with the in-process server 'CLRHost.dll'. SpellingWords.Test'

Resolve the "'Microsoft.Advertising.WinRT.UI.winmd' contains duplicate types names"
Posted on 27/12/2012<http://blog.webrox.fr/?p=43> by poppyto<http://blog.webrox.fr/?author=1>

Hi everybody,
I recently had an issue with the Microsoft Advertising SDK for WinRT.
I can't compile without an error (I found a tip – remove reference/compile/add reference/compile – but I can't compile for making an app package).
The famous error is :
error APPX1712: 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'.
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\AppxPackage\Microsoft.AppXPackage.Targets(803,9): error APPX1712: The .winmd file 'Microsoft.Advertising.WinRT.UI.winmd' contains duplicate type names. Type 'Microsoft.Advertising.WinRT.UI.XamlAdControl_XamlTypeInfo.XamlMetaDataProvider' is already registered with the in-process server 'CLRHost.dll'.
What the hell is ? It's just a bogous statment, my project is maybe not typical : I use some library, and it seems the compiler does not like that.
HOW TO RESOLVE ?

I found a lot of posts on The Internet and non solve this issue. I spent a lot of time to find this :
1. Open with notepad the SDKManifest.xml in C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\MSAdvertisingXaml\8.1\SDKManifest.xml with administrator rights
2. Edit this line <File Reference = "Microsoft.Advertising.WinRT.UI.winmd" >
3 .Modify by <File Reference = "Microsoft.Advertising.WinRT.UI.winmd" Implementation="Microsoft.Advertising.WinRT.UI.winmd" >
4. Recompile and enjoy
That's all, everything works perfect after that
EDIT

Unfortunately, this works and certification kit is happy !

1 comment:

  1. If you're looking for a good contextual ad company, I suggest you take a peek at ExoClick.

    ReplyDelete