 |
| .NET Framework 3.5 For discussion of the Microsoft .NET Framework 3.5. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the .NET Framework 3.5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

April 26th, 2010, 07:35 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
Installing assemblies into the GAC under .NET 3.5 (or 4.0)
Under .NET Framework 2.0 I generally add assemblies to the GAC using the "Microsoft .NET Framework 2.0 Configuration" tool reached via the control panel / administrative tools. There doesn't seem to be an equivalent under 3.5. What's the reason for this, and what should one use instead?
Michael Kay
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|
|

April 26th, 2010, 08:10 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
|
|
I'd use the command line tool gacutil.exe.
gacutil /i <assembly>
|
|

April 26th, 2010, 08:29 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
Thanks for the reply, Sam. But I gather gacutil.exe is only available if you have installed .NET development tools; what if you only have the runtime? (I'm looking here for advice to give to people installing Saxon on .NET).
I've also read that you can simply drag files into c:/windows/assembly but it doesn't work for me: I get "access not allowed".
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|
|

April 26th, 2010, 08:33 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
|
|
Ah yes - in that case I believe simply copying the file to the C:\Windows\Assembly directory in windows explorer should do the trick.
|
|

April 26th, 2010, 08:40 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
3.5 and 2.0 use the same run-time, so I can imagine you can use the 2.0 tool for 3.5 assemblies as well....
Or is the whole tool missing?
When you get "access not allowed", are you running as a non-admin on Windows 7 or other UAC OS?
Imar
|
|

April 26th, 2010, 09:52 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
yes, the 2.0 tool works with 3.5 - and I've been using it - but new users who install 3.5 without having 2.0 installed don't get the tool.
The "access denied" message when trying to update the GAC from Windows Explorer happens even if I start Explorer using "Run as administrator".
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|
|

April 26th, 2010, 11:22 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
It looks like Microsoft is making it harder and harder to do this. According to this:
http://msdn.microsoft.com/en-us/library/dkkx7f79.aspx
you have four options.
Mscorcfg.msc (phased out), Gacutil.exe (dev machines only), Windows Installer and the special Assembly folder.
I am getting the same Access Denied error message for most assemblies I tried, including my own siged ones. I dragged a few existing Silverlight design assemblies from Dev Express into that folder and I got no error message (but didn't see the assemblies either).
Could this be a 64 bit versus 32 bit thing?
That leaves only the installer, which seems like way too much overkill to me....
Imar
|
|

April 26th, 2010, 11:53 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
|
|
According to the following page the Explorer view on the Assembly does not run with elevated privileges even if you run Explorer with elevated privileges. You need to actually log in as an Administrator.
http://msdn.microsoft.com/en-us/library/34149zk3.aspx
The 'recommended' way is via an installer, but as Imar says this sounds a bit like overkill.
|
|

April 26th, 2010, 12:35 PM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
Thanks for all the help. Falling foul of the crazy Vista permissions system again. The KB entry says "To run the viewer with elevated permissions, log on as a local administrator." But I am a local administrator; usually if I want to do something privileged, it asks for confirmation, but here it just denies access.
I guess I ought to be developing an Installer for Saxon.NET to make this easier for people. It feels like a lot of effort - and more significantly, a lot of testing on different Windows versions, which is a logistical nightmare.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|
|

November 11th, 2010, 08:59 AM
|
|
|
I think it's best to install Net Framework 3.5 as it's the latest version but if you want to install 2.0 the steps will be similar to those below. You will get 3.5 anyway through Windows Updates if you install 2.0 because it will detect that you have an old version.
Before installing Net Framework make sure that you have Windows Installer 3.1 - it's a requirement to be able to install Net Framework. If you don't have it you can get it from the following link. If you're not sure try downloading it anyway as it will detect that it's already installed if you have it already.
|
|
 |