Question

I want to export the assemblies built in my project. But where are they physically stored?

Was it helpful?

Solution

I actually found this post, after i wrote my question. It's really good explained:

You'll be able to see them if you navigate to

c:\windows\assembly

with Explorer, where you'll see a nicely formatted list of assemblies.
The shell extension responsible for this view shows not just assemblies in the GAC, but also the native versions of assemblies pre-compiled with ngen.exe.
But the files aren't actually stored here - the shell extension simply masks their true location. You can see where the files are really stored by navigating to the same directory via a command prompt.
In this location are a number of subdirectories, including one named GAC. Buried here under several layers of hash codes and assembly names resides the physical assemblies, along with an old-fashioned .INI file that contains the strong name amongst other things. It's worth exploring in this uncharted territory just to understand what's going on under the covers, although beware of making changes as the GAC is intended to be opaque.

OTHER TIPS

They are stored in %systemroot% in a folder named assembly

The %SystemRoot% variable is a special system-wide environment variable found on Microsoft Windows NT and its derivatives. Its value is the location of the system folder, including the drive and path.

The drive is the same as %SystemDrive% and the default path on a clean installation depends upon the version of the operating system. By default, on a clean installation:

* Windows NT 5.1 (Windows XP) and newer versions use \WINDOWS
* Windows NT 5.0 (Windows 2000), Windows NT 4.0 and Windows NT 3.1 use \WINNT
* Windows NT 3.5x uses \WINNT35

(from wikipedia)

The physical location of the GAC is the Assembly directory under %WINDIR%, f.e.

c:\windows\assembly

You can copy assemblies to the gac with Explorer, or the gacutil program.

no, physically assemblies are stored not in "C:\Windows\assembly". only references to the assemblies are stored there. for example, assembly "System.Windows.Forms.dll" (as well as most part of .NET Framework assemblies) is physically stored in "C:\Windows\winsxs" in many editions, optimized for many platforms (just go to "C:\Windows\winsxs" in Explorer and type "System.Windows.Forms.dll" in the search box). for example, you may create strongly named assembly, register it to the GAC, but it's physical location is where you place the assembly file. (for example "C:\Users\%username%\Documents\Visual Studio 2008\Projects\YourAssemblyProjectName\YourAssemblyProjectName\bin\Debug" - VS projects default directory). and more, in GAC is only references to assemblies are stored, so if you rebuild your assembly wich is registered in GAC, the assemblies wich are using your assembly, by referencing it from GAC, will also use a rebuilded verion of your assembly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top