[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Creating a release version of a DLL with a separate GUID

Posted on 2013-06-05
2
Medium Priority
?
339 Views
Last Modified: 2013-06-08
I am writing a class library in VB.Net for interop use with excel (using VS 2012). The machine (a server running Windows Server 2008 R2 Standard) which holds the excel file and the dll is the same machine on which I am developing the dll.
      With the way it is set up now, I open VS and make changes to the library, then I save it and build it. From that point on, my excel file with reference the newly built dll. But if I mess something up in the dll or have to stop half way and leave some code unfinished, the deployed, active excel file is still referencing the dll which is under development.
      I want to be able to build a development version of the the dll and then, when its ready, deploy that dll separately (but on the same machine) as the dll which the excel file will be using as a reference.
      I figured out how to requester two versions of the for com interop dll by creating a copy of the project and changing the GUID for the assembly. The problem is that it takes too long and seems a bit sloppy- to have to copy the whole project and change the GUID and the compile path manually.
      I want to know if I can somehow set up a way to systematically change the GUID when I’m ready to deploy the new version of the dll, and then change it back to the old GUID once it’s done being deployed.
      Is there any way to do this quickly and efficiently?
0
Comment
Question by:BROOKLYN1950
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 39225290
How about you use conditional compilation? You could open up the AssemblyInfo.vb file within your project and do something like:

'The following GUID is for the ID of the typelib if this project is exposed to COM
#If DEBUG Then
<Assembly: Guid("81793ebf-260e-4cb3-8f1f-e5cafb5e9d1f")> 
#Else
<Assembly: Guid("36B623DA-2BD2-41EA-B9AE-0EDCBF5155EE")> 
#End If

Open in new window


When you are compiling under the DEBUG configuration the first GUID will be assigned to the assembly; when you are under RELEASE (or technically anything that is not DEBUG, since it's an "Else" in the above) the second GUID will be assigned.
0
 

Author Closing Comment

by:BROOKLYN1950
ID: 39231805
Thanks a lot
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question