Page 1 of 1
Build leaves locked mscoree.dll file
Posted: Mon May 24, 2010 10:43 am
by CPSS
I have just upgraded to Vs9 from 7.
I did this for the new cache install feature which is supposed to be good for patching.
While testing I always delete my Patch and Regular Install folders before the next Install is built.
I have the option checked to always cache.
When I try to delete the Patch or regular folder I get mscoree.dll cannot be deleted message.
I have tryed rebooting and everything and it will not delete.
I also get an error in the build because this file is locked.
I never had this problem in VS 7.
I saw another post which I added to that has the exact same problem. There was one reply that really was no reply.
Re: Build leaves locked mscoree.dll file
Posted: Mon May 24, 2010 5:23 pm
by MichaelNesmith
InstallAware uses hard links to accelerate build times and due to a bug in Microsoft's implementation of hard links, you cannot delete a hard link to a file if the actual file is in use (normally, you should be able to - at least, until the last copy of the file remains).
That said, you should never add this DLL to your setup! Use the runtime installers. It is a mistake to add this file to your setup.
If you boot in safe mode, you should be able to delete the hard linked file as it will no longer be in use.
Re: Build leaves locked mscoree.dll file
Posted: Mon May 24, 2010 9:46 pm
by CPSS
I did not add this file to my setup. It is from the runtime installer.
The mscoree.dll file is in the folder "Release\Uncompressed\data\Microsoft .NET Framework 2.0\mDotNet.dll".
I started with a install I had created in VS 7 Studio. I checked the Cache Install feature. Next I went to Pach and added an old Install, to patch against. Finally I built the patch and then built the project also. I was trying a compressed Install as well as uncompressed.
My old installs had this folder and file but I could freely delete the Release folder.
I don't kow if this is a version 9 issue or Version 9 when checking the new Cache Install feature. I do know I have done a lot of installs with basically the same setup project and there was never an issue before.
Thanks
Re: Build leaves locked mscoree.dll file
Posted: Mon May 24, 2010 10:33 pm
by MichaelNesmith
If you didn't add the file manually to your project, you shouldn't be running into this issue at all - simply because the runtime installation folder has its own copy of the file.
I'd encourage you to prepare step by step instructions on how to reproduce this issue with minimum projects that are not dependent on any files on your system.
If there is a real issue, we'll know how to recreate and then fix it. Or, you may find a solution during the process of preparing the instructions.
Re: Build leaves locked mscoree.dll file
Posted: Tue May 25, 2010 9:35 am
by CPSS
Here are the steps used for testing:
1. The Previous version of our software 2.1.0.1 had the install built originally with version 7. I opened the Install with version 9 Studio.
2. I Checked the Cache in the build settings then did a uncompressed build then exited out of Installaware.
3. I opened the new Installs folder and copied in the folder "MyProduct 2.1.0.1" to the Release folder.
4. I opened the new install in Installaware 9 and verified Product version was 2.1.0.2. Next clicked generate to create a new Revision code.
5. Went to "Build Settings" and checked "uncompressed directory layout" and also checked "Always Cache Sources ...".
6. Went to "Patches" and clicked "Add", in the "MyProduct 2.1.0.1" folder I chose the .msi file.
7. Next built patch
8. Closed Installaware then went to the project folders "Patch". In the "Patch" folder there was MyProduct.exe & a folder called "Upgraded Package". The drill down on the folder is as follows: " Patch\Upgraded Package\data\OFFLINE\B17FDF71\431AE4FA\mscoree.dll".
9. This file is locked and can not be deleted.
NOTES: We always keep a folder called "Copy of Bin Relaease MyApp" in it are all the required files and Also the Installaware folder "MyApp" which has the installaware files Release folder etc. We do this so we have everything to do with the release for a backup. The folder is not altered by newer releases. This should not matter and we have always done it, I only state it as it may make the above clearer.
Re: Build leaves locked mscoree.dll file
Posted: Tue May 25, 2010 5:36 pm
by MichaelNesmith
Something doesn't add up in your report. You claim to be no installing the mscoree.dll file, but unless you actually are installing it, it never would end up being processed as part of a patch. Adding the .NET runtime to your setup does not add this file to your patch process. So, you indeed are actually installing this file with your setup, which is a mistake as I described earlier.
Re: Build leaves locked mscoree.dll file
Posted: Wed May 26, 2010 7:45 am
by CPSS
I checked again and the mscoree.dll was not in my target directory.
But you were correct it was in my project hidden away in another folder.
Thanks