0

Can the path of GAC be changed?

I am working on a project where i need to identify all the static information regarding .net framework. I just want to make sure whether the gac path work as static information or not.

jgauffin
  • 99,844
  • 45
  • 235
  • 372
amod
  • 4,190
  • 10
  • 49
  • 75
  • 1
    Why would you want to do that? – Alex R. Jun 15 '11 at 07:12
  • 1
    *said in Heavy Weapons Guy voice* OH THIS IS BAD! http://www.youtube.com/watch?v=heORiZ8l484 – Alastair Pitts Jun 15 '11 at 07:19
  • hi i dont want to do this. actually i am working on a project where i need to identify all the static information regarding .net framework, just want to make sure whether the gac path work as static information or not. even i know rellocating gac is bad but still i need to make sure whether its possible or not. dont vote down to reduce the reputation. i think it is very important for me. i dont have ny wrong intention after all. – amod Jun 15 '11 at 08:10
  • 1
    Ah, ok. No, as you can see below: It's in the registry. – 0x434D53 Jun 15 '11 at 08:20
  • I still do not understand your question as to why you want to do this. – Frode Stenstrøm Jun 15 '11 at 08:41
  • see i told the i just want to confrom whether the gac path can be changed or not. so if i know the .net framework version then i can be sure that this is the gac folder. – amod Jun 15 '11 at 08:57

3 Answers3

2

No. It's unlikely that the path will ever change (by someone other than Microsoft). Although .NET4 assemblies are GAC:ed in a new folder.

Update

Here is a sample tool using fusion: http://www.codeproject.com/KB/dotnet/undocumentedfusion.aspx

jgauffin
  • 99,844
  • 45
  • 235
  • 372
  • yaa i am familiar with that. so i thing i should consider it as a static attribute that cant be change by user only and only microsoft can do so??? isnt it??? – amod Jun 15 '11 at 10:17
  • 1
    Read this question: http://stackoverflow.com/questions/1557141/how-can-i-get-the-location-of-the-gac-using-c – jgauffin Jun 15 '11 at 10:45
1

I don't think it's a good idea at all. But anyway: http://www.codeproject.com/KB/dotnet/demystifygac.aspx has a section the describes how to relocate the GAC. The document is a bit outdated, so not shure if it still works.

0x434D53
  • 1,425
  • 12
  • 20
1

The GAC folder is in fact a part of Windows OS and you must not change the path to it (if you are not evil-doer)

macropas
  • 3,100
  • 3
  • 22
  • 25