Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / November 2005

Tip: Looking for answers? Try searching our database.

Word and Excel loads version 1.1 of the CLR instead of 2.0 (Beta 2 -> RTM issue)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim Meyer - 07 Nov 2005 12:32 GMT
We are in the process of migrating from Beta 2 to the RTM version of
Visual Studio 2005 and the .NET Framework. After the RTM version has
been installed, Word and Excel no longer load the 2.0 framework for our
C# addin, but instead version 1.1. For some unknown reason PowerPoint
still loads 2.0 correctly?!

I've tested on machines with VS2005 RTM and on machines with the runtime
only. The problem occurs for Office 2003 running on Windows XP SP2.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/g
ngrfrequiredruntime.asp

mentions a requiredRuntime element which can specify that excel or word
should load v2.0 of the CLR, but adding the excel.exe.config and
word.exe.config to the office folder seems to be a quick-fix until some
overwrites these files.
"Jeffrey Tan[MSFT]" - 08 Nov 2005 06:49 GMT
Hi Jim,

Thanks for your post.

Based on my understanding, your Word/Excel addin does not load the lastest
CLR, while it still load .Net 1.1.

Based on our test on Windows XP SP2, the Office Addin should load the
lastest version of CLR. So this issue maybe your machine-specific. I
suggest you try this issue on other machines.

Also, if you can not go with the config file workaround, I think you may
try to clearly remove the .Net Framework and re-install a RTM .Net
Framework. Then this problem should go away. To clearly remove both .Net
Framework 1.1, I suggest you remove it manually following the KB below:
"How to troubleshoot Microsoft .NET Framework 1.1 installation issues"
http://support.microsoft.com/?id=824643

To remove .Net Framework2.0, just go to Add/Remove in Control panel and
remove it.

Hope it helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jim Meyer - 08 Nov 2005 15:31 GMT
I appears that it works correctly for users that are not local
administrators on the current machine. For these users, the .NET Runtime
adds the following to the Application Event Log when Word, Excel or
PowerPoint starts:

"The following information is part of the event: Unable to open shim
database version registry key - v2.0.50727.00000."

This event log message does not appear for users that are local
administrators. Reinstalling the .NET framework has no effect on the
problem. I hope this information can help resolve the issue.

Jeffrey Tan[MSFT] wrote:
> Hi Jim,
>
[quoted text clipped - 24 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
Jim Meyer - 08 Nov 2005 17:37 GMT
Update:

I attached RegMon to Word during startup, and it used the following
registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\AppPatch\v2.0.50727.00000\winword.exe

Which contains the following values:

------------

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\AppPatch\v2.0.50727.00000\winword.exe]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\AppPatch\v2.0.50727.00000\winword.exe\{2CCAA9FE-6884-4AF2-99DD-5217B94115DF}]
"Minimum File Version Number"="11.0.0.0"
"Maximum File Version Number"="11.0.9999.9999"
"Target Version"="v1.1.4322"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\AppPatch\v2.0.50727.00000\winword.exe\{2CCAA9FE-6884-4AF2-99DD-5217B94115DF}\Registry
Keys]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\AppPatch\v2.0.50727.00000\winword.exe\{2CCAA9FE-6884-4AF2-99DD-5217B94115DF}\Registry
Keys\{2CCAA9FE-6884-4AF2-99DD-5217B94115DF}]
"Key Presence"=dword:00000000
"Key
Name"="HKEY_CLASSES_ROOT\\Interface\\{000C0601-0000-0000-C000-000000000046}"

------------

If I rename the winword.exe registry key to winword2.exe for example,
word loads v2.0 of the CLR as expected, and the addin loads
successfully. For some reason, powerpoint.exe has not been added to the
AppPatch registry key, which explains why PowerPoint works.

My immediate impulse is to delete the registry keys for Word an
PowerPoint, but I've found no documentation about the registry key, so I
not sure it's the right solution.

> I appears that it works correctly for users that are not local
> administrators on the current machine. For these users, the .NET Runtime
[quoted text clipped - 38 lines]
>> This posting is provided "as is" with no warranties and confers no
>> rights.
"Jeffrey Tan[MSFT]" - 09 Nov 2005 09:35 GMT
Hi Jim,

Thanks for your feedback.

I do not think it is this registry key that caused your strange problem.
Because on my test machine, it has the same registry structure as you
posted. However, I do not know why after renaming this registry key, your
word will correctly load .Net2.0 CLR now. Anyway, because this registry
resides in my work well machine, I do not suggest you to delete this
registry key, because this may cause some serious issue.

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jim Meyer - 09 Nov 2005 10:34 GMT
Jeffrey Tan[MSFT] wrote:
> Hi Jim,
>
[quoted text clipped - 14 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.

I'm almost 100% sure it does cause the problem - let me explain:

RegMon shows that when word runs for a non-administrator, Word gets an
Access Denied result when it attempts to open the AppPach registry key:

WINWORD.EXE:2324    OpenKey
HKLM\Software\Microsoft\.NETFramework\Policy\AppPatch\v2.0.50727.00000
ACCESS DENIED    Access: 0xF003F TESTLAB\nonadminuser   

For users with local administrator rights word successfully reads the
key and loads the specified 1.1 target version (which is wrong in our
case). So the registry key does determine the application compatibility
setting for the CLR version.

I've tried this across multiple test machine - admin users get v1.1 of
the CLR in Word and Excel, while non-admin users on the same machine get
v2.0 since the AppPatch key is not successfully read by word and excel.
For both types of users, PowerPoint loads v2.0, since there is no
powerpoint.exe listed under the AppPatch registry key.

I believe that the purpose of the AppPatch registry key is to prevent
v2.0 braking changes to affect word and excel addins running v1.1 of the
framework.
"Jeffrey Tan[MSFT]" - 10 Nov 2005 07:49 GMT
Hi Jim,

Thanks for your feedback.

This is really a strange issue. I have consulted our product team for this
issue, and based on the feedback, this issue can be fixed by installing the
update below:
http://www.microsoft.com/downloads/details.aspx?FamilyId=1B0BFB35-C252-43CC-
8A2A-6A64D6AC4670&displaylang=en

So I suggest you install this update and check if it resolves your problem.
Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jim Meyer - 10 Nov 2005 10:27 GMT
I've just installed the update, and it fixes the issue for Word and
Excel. Thank you for the support.

Jeffrey Tan[MSFT] wrote:
> Hi Jim,
>
[quoted text clipped - 14 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 10 Nov 2005 11:44 GMT
Cool, it seems that your issue is exactly the same one as what this update
fixed. If you need further help, please feel free to post. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.