DWMAPI.dll and System.EnterpriseServices.dll

DWMAPI.dll and System.EnterpriseServices.dll

Old forum URL: forums.lhotka.net/forums/t/1957.aspx


Gareth posted on Tuesday, December 12, 2006

Hi all, I'm just building the CSLA 2.1.1 and Project Tracker libraries for the first time and I've come across an issue on my machine. The CSLA libraries build okay, but the Project Tracker stuff will not build due to an error when referencing the System.EnterpriseServices.dll. Now this occurs even when I am not building an libraries based on COM+/EnterpriseServices. For examples in the Project Tracker solution I've removed every project except for PTWin and ProjectTracker.Library and I've made sure that the app.config is only using a localproxy, so no references to System.EnterpriseServices.dll are used.
When the executing code reaches the Fetch method (after entering the username and password on the login screen) there is a FileIO exception due to a dependancies of System.EnterpriseServices.dll not being found. The dependancy (according to depends.exe) is DWMAPI.dll which is the new Vista Desktop Windows Management API that IE7 references.
Now I'm using Windows XP with SP2 and IE7, not Vista and I definately don't have this DLL. I've checked out various posts via Google and it seems like uninstalling IE7 is the way to go but I really don't want to do this.
I wanted to know if anyone else has had this problem and has got around it.

One solution I am toying with is creating and registering my own skeleton DWMAPI.dll and seeing if that will get around the problem. There are a couple of posts suggesting this with source code in C++. It seems feasible. I'm guessing that grabbing DWMAPI.dll off a Vista machine won't work but that might be worth trying.
Does anyone have any other ideas or solutions?
Thanks,
Gareth.

Gareth replied on Tuesday, December 12, 2006

Okay I think I've found the solution. I did a repair on the .NET 2.0 Framework and rebooted. Depends.exe still shows the missing dependancy but the project now builds and executes correctly.

Hope that's of use to others!
Regards,
Gareth.

Copyright (c) Marimer LLC