2

I am trying to write a UWP program using C++/WinRT, but when I directly and indirectly reference a Windows runtime Component twice, I received the following compilation error, "Duplicate type Core.ALBUM found processing metadata file". I don't have much knowledge of COM. I searched a lot of information but didn't help . what should I do?

Cool
  • 23
  • 5
  • I'm not sure what you're doing. Please provide a [mcve] and tell us the complete steps to reproduce your issue. – Xie Steven May 02 '19 at 02:20
  • 1
    I created two runtime components with C++/WinRT, A and B. B reference A, they are all referenced by another project C. When building,the compiler complains: Duplicate types in metadata files. Simply put, the ViewModel I created in A are used in B and C, respectively. B referenced by C, at compile time, the compiler has an error. MDM2009 Duplicate type Core.ALBUM found processing metadata file ...Player\Core.winmd, type already exists in file ...Core.winmd. – Cool May 02 '19 at 04:21

1 Answers1

0

This can happen with static library project references. There's an ongoing thread on the project's site.

https://github.com/Microsoft/xlang/issues/318

Go there and chime in. Your repro case may help us improve the experience.

Ryan Shepherd
  • 755
  • 4
  • 11