Reputation: 1472
I am just starting a metro app. The main application is a c++ metro app. The application builds and runs fine.
I have a c# library added to the solution and it builds everything builds fine.
I reference the C# library from the C++ application and it will not build with the following errors:
error WMC1006: Cannot resolve Assembly or Windows Metadata file 'System.Runtime.dll'
error EMC9999: Type universe cannot resolve assembly: System.Runtim, Version.....................
Any ideas what's going on? I have not added any references to my c# class library. It's a vanilla metro library.
Thanks! Eric
Upvotes: 2
Views: 1731
Reputation: 46
I had a similar problem in my app and was getting the same errors
Cannot resolve Assembly or Windows Metadata file 'System.Runtime.dll'
Type universe cannot resolve assembly: System.Runtime
My app is a mixed C#/C++ Windows Store app where the main project is C#. I'm using VS 2012 Pro.
My problems came from deleting .net SDKs from the system when I was attempting to resolve a different issue.
The solution for me was running (in an admin command prompt)
DISM.exe /Online /Cleanup-Image /RestoreHealth
and then doing a repair (Programs and Features -> Change -> Repair) on my Visual Studio 2012 Professional installation.
These were the only steps that allowed me to build the app again.
Upvotes: 0
Reputation: 1962
Unfortunately, as Kris Vandermotten points out, C++/CX cannot consume C# class libraries (only WinMD files), and there are many restrictions on WinMD files that do not exist for managed class libraries.
Upvotes: 1