473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 2130
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.comwrote in message
news:uH**************@TK2MSFTNGP02.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.comwrote in message
news:u1**************@TK2MSFTNGP02.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.comschreef in bericht
news:ud**************@TK2MSFTNGP02.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.comwrote:
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.stempsoft.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.comschreef in bericht
news:uC**************@TK2MSFTNGP03.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
by: Keith Smith | last post by:
What is the difference between "build" and "rebuild" when building a project?
2
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...
3
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
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...
0
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...
1
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...
1
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...
0
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
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
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...

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.