Building MSI on Windows Server 2003 fails with File Protection Error

Add-in Express™ Support Service
That's what is more important than anything else

Building MSI on Windows Server 2003 fails with File Protection Error
 
AdamC




Posts: 14
Joined: 2009-06-01
Hi,

I'm trying to build the deployment project that is created by the ADX.NET for IE and I am seeing this error:

ERROR: 'shdocvw.dll' should be excluded because its source file 'C:\WINDOWS\system32\shdocvw.dll' is under Windows System File Protection.

The shdocvw.dll file is not referenced by the deployment project, but it Interop.shdocvw.dll is - is this interop file causing a reference back to the original shdocvw.dll?

This is happening on a build server, not a development machine.

Has this problem been seen before?

Thanks,

Adam
Posted 19 Jun, 2009 01:25:07 Top
AdamC




Posts: 14
Joined: 2009-06-01
I have done some more research... It appears that the deployment project on the build server thinks that shdocvw.dll is a dependency - whereas the on the development machines, it does not.

I have also noticed that on the development machines, Interop.shdocvw.dll is in the c:\windows\Assembly\Download folder, whereas on the build server it is not - could that be relevant?

Still haven't fixed the problem though, so any help would be appreciated.

Thanks,

Adam

P.S Oh, the build server is IE6 whereas the dev machines are IE7. I'm 99% sure the project was created with the "Use IE6 compatible interops" checkbox ticked - is there any way to confirm that?
Posted 19 Jun, 2009 02:00:49 Top
Andrei Smolin


Add-in Express team


Posts: 18856
Joined: 2006-05-11
Hi Adam,

You need to exclude shdocvw.dll from dependencies. When you create an Add-in Express project, the interop is placed to the Interops folder of your project. Check the file date of Interop.SHDocVw.dll: if it is the same as the Interop.SHDocVw.dll located in the Redistributable folder of Add-in Express install folder, then you are using IE6 interops. If the file was created when you created your project, then you use interops for the IE version installed on your PC. Another way to check this is finding a method that was introduced in IE 7, say IEApp.GoHome.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Jun, 2009 09:53:18 Top
AdamC




Posts: 14
Joined: 2009-06-01
Hi Andrei,

Thanks for your help. Unfortunately the shdocvw.dll does not show up as a dependency on the development machines, so we can't exclude it from the .vdproj. I have two questions:

1. Why would the shdocvw.dll be a "Detected Dependency" on the build server, but not on the development machines?
2. Is there anyway to exclude shdocvw.dll as a dependency without it being listed under the "Detected Dependencies" section in the deployment project in Visual Studio.

Thanks!

Adam
Posted 19 Jun, 2009 14:24:33 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Adam.

1. I guess that you have different versions of this dll installed on the developer's PC and the build server. In any case you don't need to include it in the setup project.
2. You can set the Exclude property to false manually in the .vdproj file.
Posted 22 Jun, 2009 12:19:27 Top
Albert Englewood




Posts: 1
Joined: 2009-06-24
Ran into the same problem and found this page via Google. Not using add-in-express, but thought I'd share the solution.

My .vdproj file compiled fine on my local machine. But the build machine was reporting the error:

ERROR: 'shdocvw.dll' should be excluded because its source file 'C:\WINDOWS\system32\shdocvw.dll' is under Windows System File Protection.

The .vdproj file did not show a "shdocvw.dll" so there was nothing I can click on in order to mark as "Exclude". I tried to manually modify the file, but there was no "shdocvw.dll" there either.

The solution was to open the .vdproj file on the build machine itself. There, the "shdocvw.dll" is listed in Visual Studio as a dependency. I marked it as "Exclude" and saved the file. Now the build works.
Posted 24 Jun, 2009 18:26:48 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Albert.

Thank you for the solution.
Posted 25 Jun, 2009 06:13:01 Top