Assembly Versioning

1. First compile the ASampleClass solution (project). Open a command line window as follows:

(a) Click on Start, Programs, Microsoft Visual Studio .NET, Visual Studio .NET Tools, Visual Studio .NET Command Prompt.

(b) In the command window type the word cd followed by a space. Do not hit return.

(c) Keep the command window on left and bring up the windows explorer on the right of the monitor.

(d) In the windows explorer, go to the director that contains this file.

(e) Drag the ASampleClass directory from windows explorer to the command window.

(f) Set focus on the command window and hit return.

(g) type cd bin\debug and hit return again.

2. In the command window, type

gacutil /i ASampleClass.dll

3. In Windows Explorer view the contents of C:\Winnt\Assembly to find the assembly that you just added.
4. Note the version of the assembly that has been cached.
5. Now open the User solution (project), and click on Project, Add References. Now click on the Browser button and navigate to the ASampleClass\bin\Debug directory and pick the ASampleClass.dll. Click Open. Click OK now.
6. Compile the code and execute it.
7. The output should be Sample information.
8. Now open the ASampleClass and modify the getInformation method of Info class to return “Sample NEW Information.”
9. Compile, and run the gacutil again to push the change to the global cache.
10. View the global assembly cache using windows explorer.
11. You will notice two version of the ASampleClass assembly.
12. Now run the User.exe without recompilation (by double clicking on the User.exe in Windows Explorer).
13. Note from the output that the program still is using the older version.
14. Now recompile User and try running to see if it uses the newer version.