02.07.2013 Views

.NET Interview Questions 4 th Edition By Shivprasad ... - A2Z Dotnet

.NET Interview Questions 4 th Edition By Shivprasad ... - A2Z Dotnet

.NET Interview Questions 4 th Edition By Shivprasad ... - A2Z Dotnet

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 1.11: - Solution files for <strong>th</strong>e versioning project.<br />

Our first primary goal is to put two different versions of <strong>th</strong>e same DLL in GAC. So let us make a<br />

walk <strong>th</strong>rough of “ClassLibraryVersion” project. It is a very simple class <strong>th</strong>at has “Version”<br />

function, which just sends a string “This is old Version”. Second, we will also just ensure <strong>th</strong>at <strong>th</strong>e<br />

assembly version is “1.0” in <strong>th</strong>e “AssemblyInfo.cs”.<br />

Figure 1.12: - Assembly Version 1.0<br />

Second, in order <strong>th</strong>at we can put a DLL in GAC we need to create generate strong names and<br />

assign <strong>th</strong>e same to <strong>th</strong>e class. For instance, in below figure I have generated <strong>th</strong>e strong name in<br />

“mykey.snk” and assigned <strong>th</strong>e same to <strong>th</strong>e DLL.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!