473,772 Members | 2,965 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using different references based on "build"


I am using VB in Vs2005. Am I missing something or does VB not have the
concept of "builds" (release/debug) like in VC? I wrote an assembly
and I would like to have a debug version of the DLL and a release
version of the DLL. I would like to create some sample code that
demonstrates my assembly in VB and would like to have two builds, one
using my debug version and the other using the release version of the
assembly.

How can I do this? I can't see how in VB.

P.S. I am currently using the Express version so perhaps that explains
why I am not seeing this?


--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com
Dec 26 '06 #1
8 2172
Bruce,

If you right-click on your project in the Solution Explorer and select Open,
it will bring you to the properties dialog. Compile or Debug should do ya.
:) Hope this helps.

Bruce

"Bruce" <Br***@nospam.c omwrote in message
news:uH******** ******@TK2MSFTN GP02.phx.gbl...
>
I am using VB in Vs2005. Am I missing something or does VB not have the
concept of "builds" (release/debug) like in VC? I wrote an assembly and
I would like to have a debug version of the DLL and a release version of
the DLL. I would like to create some sample code that demonstrates my
assembly in VB and would like to have two builds, one using my debug
version and the other using the release version of the assembly.

How can I do this? I can't see how in VB.

P.S. I am currently using the Express version so perhaps that explains
why I am not seeing this?


--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com

Dec 27 '06 #2
Bruce W. Darby wrote:
Bruce,

If you right-click on your project in the Solution Explorer and select Open,
it will bring you to the properties dialog. Compile or Debug should do ya.
:) Hope this helps.

Thanks Bruce. I know how to bring up the properties box. I can see
the debug tab. But I don't think that is what I want.

What I want to do is use one external referenced assembly for debug and
another for release. I just see one set of references period.

Bruce


--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com
Dec 27 '06 #3
Now I can see what you are attempting.

Assuming that your 'external assembly' was also developed in VS 2005, then
simply add your 'external project' to your current solution, change the
reference to it to be 'project' rather than 'file', then, when you compile
your current project in 'debug', it will use the 'debug' version of your
'external assembly' and when you compile your current project in 'release'
it will use the 'release' version of your 'external assembly'.
and make your current project If you add the project for your
"Bruce" <Br***@nospam.c omwrote in message
news:u1******** ******@TK2MSFTN GP02.phx.gbl...
Bruce W. Darby wrote:
>Bruce,

If you right-click on your project in the Solution Explorer and select
Open, it will bring you to the properties dialog. Compile or Debug should
do ya. :) Hope this helps.

Thanks Bruce. I know how to bring up the properties box. I can see the
debug tab. But I don't think that is what I want.

What I want to do is use one external referenced assembly for debug and
another for release. I just see one set of references period.

Bruce


--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com

Dec 27 '06 #4
Stephany Young wrote:
Now I can see what you are attempting.

Assuming that your 'external assembly' was also developed in VS 2005, then
simply add your 'external project' to your current solution, change the
reference to it to be 'project' rather than 'file', then, when you compile
your current project in 'debug', it will use the 'debug' version of your
'external assembly' and when you compile your current project in 'release'
it will use the 'release' version of your 'external assembly'.

But the external assembly is written in C++, so there are two different
file names for the assembly MyAssemblyD.Dll for debug and MyAssembly.DLL
for release.

Plus remember that these are sample VB projects so, once if I
distribute them then they will not work because the person getting the
samples will not have my project.

I would have to change the VB project anyway so I might as well switch
between the debug and release version of the external assembly DLL.

It is hard to believe that VB does not have a way to build using
different parameters from one project. But I guess it is so?

Bruce

--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com
Dec 27 '06 #5
Why not use conditional compilation contstants when loading the assembly ?

like this
# IF DEBUG THEN
# ELSE
# END IF

regards

Michel
"Bruce" <Br***@nospam.c omschreef in bericht
news:ud******** ******@TK2MSFTN GP02.phx.gbl...
Stephany Young wrote:
>Now I can see what you are attempting.

Assuming that your 'external assembly' was also developed in VS 2005,
then simply add your 'external project' to your current solution, change
the reference to it to be 'project' rather than 'file', then, when you
compile your current project in 'debug', it will use the 'debug' version
of your 'external assembly' and when you compile your current project in
'release' it will use the 'release' version of your 'external assembly'.


But the external assembly is written in C++, so there are two different
file names for the assembly MyAssemblyD.Dll for debug and MyAssembly.DLL
for release.

Plus remember that these are sample VB projects so, once if I distribute
them then they will not work because the person getting the samples will
not have my project.

I would have to change the VB project anyway so I might as well switch
between the debug and release version of the external assembly DLL.

It is hard to believe that VB does not have a way to build using different
parameters from one project. But I guess it is so?

Bruce

--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com

Dec 27 '06 #6
Michel Posseth [MCP] wrote:
Why not use conditional compilation contstants when loading the assembly ?

like this
# IF DEBUG THEN
# ELSE
# END IF

regards

Michel
Thanks Michel,

Where do I put this? All I see is a list of references. I am not a VB
programmer, I am a C++ programmer trying to write some sample code for
my C++ assembly.

Bruce

--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com
Dec 27 '06 #7
Bruce,
In addition to the other comments.
It is hard to believe that VB does not have a way to build using
different parameters from one project. But I guess it is so?
VB *does* have a way to build using different parameters!

However by default it is turned off. Use "Tools - Options - Projects
and Solutions - General - Show Advanced Build Configurations" to enable
or disable the feature. Once you enable this option you will have both
Release & Debug builds available.

The caveat is, there are not different References based on Release &
Debug builds per se.

What I normally do is use output folders to hold my Release & Debug
builds of my C++, VB, or C# projects, rather then use file names. Then
I will put the C++, VB, or C# projects all in one solution. Where each
project references the other project, *by project* (not file!) This way
the Release build of the VB project will use the output of the Release
build of the C++ project, likewise the Debug build of the VB project
will use the output of the Debug build of the C++ project. Considering
that I build the entire solution...

Having said that I suspect (but have not tested) that you could change
the output name of the C++ assembly within the respective Debug or
Release configuration & the respective VB build will respectively use
named C++ assembly. Again based on using Project references within a
solution & not file references. Again I have not tested this theory.

--
Hope this helps
Jay B. Harlow
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


On Dec 26, 9:11 pm, Bruce <B...@nospam.co mwrote:
Stephany Young wrote:
Now I can see what you are attempting.
Assuming that your 'external assembly' was also developed in VS 2005, then
simply add your 'external project' to your current solution, change the
reference to it to be 'project' rather than 'file', then, when you compile
your current project in 'debug', it will use the 'debug' version of your
'external assembly' and when you compile your current project in 'release'
it will use the 'release' version of your 'external assembly'.But the external assembly is written in C++, so there are two different
file names for the assembly MyAssemblyD.Dll for debug and MyAssembly.DLL
for release.

Plus remember that these are sample VB projects so, once if I
distribute them then they will not work because the person getting the
samples will not have my project.

I would have to change the VB project anyway so I might as well switch
between the debug and release version of the external assembly DLL.

It is hard to believe that VB does not have a way to build using
different parameters from one project. But I guess it is so?

Bruce

--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPSwww.stempsof t.com
Dec 27 '06 #8
Well you could implement a interface , and load the assembly dynamicly
through code ( by implementing an interface you keep intellisense )

with the method i described ( with conditional compilation contstants )

http://msdn.microsoft.com/library/de...ml/vadirIf.asp

I use this method since VB6 in my projects as i had a lot of customers with
different wishes but the basic source of most of my programs is just one
sourcecode
as i did not want my progies to get bloated by unnecesary source from wishes
of differnt customers i implemented coditional compilation .

So building your proggy with the debug switch on will result in a different
code flow in your application

hth

regards

Michel

"Bruce" <Br***@nospam.c omschreef in bericht
news:uC******** ******@TK2MSFTN GP03.phx.gbl...
Michel Posseth [MCP] wrote:
>Why not use conditional compilation contstants when loading the assembly
?

like this
# IF DEBUG THEN
# ELSE
# END IF

regards

Michel


Thanks Michel,

Where do I put this? All I see is a list of references. I am not a VB
programmer, I am a C++ programmer trying to write some sample code for my
C++ assembly.

Bruce

--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com

Dec 27 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
10009
by: Keith Smith | last post by:
What is the difference between "build" and "rebuild" when building a project?
2
1690
by: Axel Dahmen | last post by:
Hi, when applying changes to the code and hitting to debug, a MessageBox pops up asking me if I want to build before debugging. Of course I want, that's why I've changed the code... Is there a simple way to suppress this MessageBox in Studio 7 and to start a Build-Debug sequence immediately? TIA, Axel Dahmen
3
1364
by: gregory_may | last post by:
Is it possible to Obfuscate the Release build of my application as part of the compile/automatically? Thanks!
0
1291
by: Diffident | last post by:
Hello All, I am trying to do a "build" of all files of my web app on my local machine. I know that there is an "aspnet_wp.exe" running forever on my machine and to my knowledge each web app is hosted in its own AppDomain. Now when I do a build on my local machine is this AppDomain unloaded? If yes, why does it have to be unloaded? Cannot it drain stop the current AppDomain and spawn a new AppDomain with the new assembly. Please refer to...
0
1379
by: Ubergeek | last post by:
I noticed this bug ever since I installed VC7.1 on the same machine as VC6. Sometimes when I am working with VC6, when I do a build, after the build finishes, the various menu items/toolbars remain disabled and I cant do another build - or even quit VC. Everytime I try to quit, I am informed that I cannot Exit whilst a build is in progress, and that I have stop the build first. As I said before, the stop build button has no effect. Has...
1
1906
by: mac | last post by:
I just put C# express editiion on my son's computer so he can learn how to code, and we've run into a weird problem. Whenever he makes a change to his code and hits F6 (build) the IDE reports that the build succeded. However, when he runs the program (Start without debugging), the new build IS NOT being run. He has to actually choose Build|Rebuild Solution from the menu for the new build to run. Just building with F6, or running with...
1
1396
by: John Dalberg | last post by:
The "Build Web Site" build option seems to do a complete build even when no changes have been made. Is there a way to do a build only when a source file has changed? This is a web site app. John Dalberg
0
1118
by: =?Utf-8?B?d2lubGlu?= | last post by:
Hello Using VS 2005 and VB.net In Solution Explorer amongst other things there can be: 1)a project with forms 2)Class libraries 3)user controls 4)the solution itself
0
1500
by: Andy B | last post by:
I installed the guidance package projects (smart devices, web client and service model projects). I tried them out and found they aren't for me. When I removed all the traces of them from my projects and tried to compile the site, it said build failed. The wierd funky part is no errors show up in the error list. If I remove the web deployment projects then the build completes without complaining. When I recreate the web deployment projects...
0
9620
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10104
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9912
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.