This project has moved and is read-only. For the latest updates, please go here.

CF Assembly References and Environment Variables

Topics: User Forum
Aug 31, 2010 at 4:30 PM


When I reference Compact Framework assemblies directly (by picking single files through "Add File/Project Reference...") everything works as expected.

However, when I try to use environment variables (like e.g. %ProgramFiles%\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\*.dll) as suggested in a FAQ item then I always get an error similar to the following:

MrefBuilder (v2.6.10621.1)
Copyright c Microsoft 2006
Info: Loaded 7 assemblies for reflection and 7 dependency assemblies.
MREFBUILDER : error : Unresolved assembly reference: System.Windows.Forms (System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes) required by [snip]

What am I doing wrong?



Aug 31, 2010 at 8:35 PM

You probably need to use the MSBuild variable format rather than percent signs: $(ProgramFiles)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\*.dll



Aug 31, 2010 at 10:12 PM
Edited Aug 31, 2010 at 10:18 PM

This fixes the problem. I guess I got confused by the fact that %ProgramFiles% is correctly expanded in the SHFB GUI.

Anyway, many thanks for a great tool!