This project is read-only.

Cannot resolve assembly reference: Windows


Hi all,
I'm working in a metro app style project
This is error I got when generating documentation:
MREFBUILDER : error : Unresolved assembly reference: Windows (Windows, Version=, Culture=neutral, PublicKeyToken=null)
Windows here is a dependency assembly which has properties like in attached pic. But there is nothing helpful in the path.
It's a default reference of every metro application project and cannot be remove, what do I support to do to get over this?
Any help or idea to solve problem would be greatly appreciated, thx!

file attachments


ArvindKnudsen wrote Apr 25, 2012 at 5:46 PM

We have this issue too.

Does anyone have a workaround or fix for this?

EWoodruff wrote Apr 27, 2012 at 12:51 AM

You need to specify the Windows.winmd file in the C:\Program Files (x86)\Windows Kits\8.0\Windows Metadata\ folder as a reference assembly either using the /dep command line switch or, if using SHFB, by adding it to your SHFB project in the References node. Metro apps apparently use a difference extension on some of their reference assemblies. Note that if using SHFB, you'll need to navigate to the reference folder and type . and hit Enter to show all the files to select it or enter the name manually once you get to the folder. You may get a warning about needing to update the Framework version or something. Just click OK/Yes to accept it and it'll add the reference. After that you'll be able to build the documentation project.

SHFB doesn't appear to find the target assembly when the project is used as a documentation source so I'll have to look into supporting that. Adding support for that may solve the reference issue too. The workaround for now is to just add the assembly and XML comments files as documentation sources directly along with any required reference assemblies.

wrote Apr 27, 2012 at 10:42 AM

Monday9 wrote Apr 27, 2012 at 10:42 AM

Hi EWoodruff,
I use .dll and XMA comments files as documentation sources.
Like the last time i said, I tried to add the Windows.winmd file in the path as a reference but it just won't work, I don't get any warning at all, the References node still empty. I don’t know what wrong, can you show me a little more about the way you add that file?

Btw, I use Win 8 consumer 64 bits build 8250, is that make any different?

rafaga12 wrote May 15, 2012 at 6:16 PM

A workaround is to create a copy of the file Windows.winmd and rename the copy to Windows.dll, this way you can add it to the references of Sandcastle Help File Builder, by the way the file is located here: C:\Program Files (x86)\Windows Kits\8.0\Windows Metadata

Monday9 wrote May 21, 2012 at 10:42 AM

@afaga12: it works like a charm, thank you so much!

wrote Sep 6, 2012 at 9:31 AM

EWoodruff wrote Sep 9, 2012 at 8:53 PM

I've modified the standalone GUI so that it recognizes .winmd files as reference assemblies. The current release filters out anything other than .exe and .dll. The VSPackage is capable of adding the references but you do need to explicitly change the filename filter in the Open File dialog to show ".*" so that you can pick it. I'm looking into support Windows Store Apps as a framework type so that this isn't an issue.

wrote Feb 22, 2013 at 1:39 AM