473,734 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Release build using Debug DLLs

Hi there

We are trying to build a C sharp solution in Visual Studio 2005 Professional.

We have a number of other assemblies, that do not form part of the solution.

Assemblies that do form part of the solution have been referenced using the
Projects tab in the Add Reference dialog.

Assemblies that do not form part of the solution have been added usingthe
Browse tab.

The problem is that when we do a Release build, it still references the
Debug build assemblies of the non solution projects, rather than the release
assemblies.

Is there any way of forcing the references to use Debug/Release assemblies
for the "browsed" assemblies as appropriate?

Thanks in advance

Hugh
Oct 30 '07 #1
6 2384
If the Assemblies do not form part of the solution, why are they part of the
solution? Reference the projects instead.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"Hugh" <Hu**@discussio ns.microsoft.co mwrote in message
news:1A******** *************** ***********@mic rosoft.com...
Hi there

We are trying to build a C sharp solution in Visual Studio 2005
Professional.

We have a number of other assemblies, that do not form part of the
solution.

Assemblies that do form part of the solution have been referenced using
the
Projects tab in the Add Reference dialog.

Assemblies that do not form part of the solution have been added usingthe
Browse tab.

The problem is that when we do a Release build, it still references the
Debug build assemblies of the non solution projects, rather than the
release
assemblies.

Is there any way of forcing the references to use Debug/Release assemblies
for the "browsed" assemblies as appropriate?

Thanks in advance

Hugh

Oct 30 '07 #2
When you used Browse to add the reference, you (probably) chose the Debug
location. Therefore, your project knows only about those files. It does not
know that there is a Release version available.

We do something like this for some common utility assemblies that are shared
across a number of solutions.

Our solution to this was to modify the project for those assemblies you wish
to include to copy the output to the PublicAssemblie s directory under the
Visual Studio 8 (C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\P ublicAssemblies on my system). From that location,
solutions can establish references using the normal .NET tab of the add
reference dialog.

This allows you to choose which assemblies to link to by building the proper
version (or just copying them) when you want to change.

"Hugh" <Hu**@discussio ns.microsoft.co mwrote in message
news:1A******** *************** ***********@mic rosoft.com...
Hi there

We are trying to build a C sharp solution in Visual Studio 2005
Professional.

We have a number of other assemblies, that do not form part of the
solution.

Assemblies that do form part of the solution have been referenced using
the
Projects tab in the Add Reference dialog.

Assemblies that do not form part of the solution have been added usingthe
Browse tab.

The problem is that when we do a Release build, it still references the
Debug build assemblies of the non solution projects, rather than the
release
assemblies.

Is there any way of forcing the references to use Debug/Release assemblies
for the "browsed" assemblies as appropriate?

Thanks in advance

Hugh

Oct 30 '07 #3
Thanks for th ereply. Kevin.

Perhaps I did not make myself as clear as I should. We do want to reference
the assemblies being used, but we didn't want to include the projects within
the solution (for various reasons). What we do want is too pick up the debug
versions of those referenced assembles (but not referenced by project) when
building teh solution in debug, and the release versions when building the
solution as Release.

We used to be able to do this under the pre- .Net VS by setting up the
libraries etc differently under each build configuration - there doesn't seem
to be that facility in VS2005.

We do not have the projects for some of the assemblies, just release and
debug builds.

"Kevin Spencer" wrote:
If the Assemblies do not form part of the solution, why are they part of the
solution? Reference the projects instead.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"Hugh" <Hu**@discussio ns.microsoft.co mwrote in message
news:1A******** *************** ***********@mic rosoft.com...
Hi there

We are trying to build a C sharp solution in Visual Studio 2005
Professional.

We have a number of other assemblies, that do not form part of the
solution.

Assemblies that do form part of the solution have been referenced using
the
Projects tab in the Add Reference dialog.

Assemblies that do not form part of the solution have been added usingthe
Browse tab.

The problem is that when we do a Release build, it still references the
Debug build assemblies of the non solution projects, rather than the
release
assemblies.

Is there any way of forcing the references to use Debug/Release assemblies
for the "browsed" assemblies as appropriate?

Thanks in advance

Hugh


Oct 30 '07 #4
Thanks for the prompt reply, Bryan.

This could work for us if the location you talk about can have both a
release and a debug build assembly in it - is this possible without changing
the asembly names?

Hugh

"bryan" wrote:
When you used Browse to add the reference, you (probably) chose the Debug
location. Therefore, your project knows only about those files. It does not
know that there is a Release version available.

We do something like this for some common utility assemblies that are shared
across a number of solutions.

Our solution to this was to modify the project for those assemblies you wish
to include to copy the output to the PublicAssemblie s directory under the
Visual Studio 8 (C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\P ublicAssemblies on my system). From that location,
solutions can establish references using the normal .NET tab of the add
reference dialog.

This allows you to choose which assemblies to link to by building the proper
version (or just copying them) when you want to change.

"Hugh" <Hu**@discussio ns.microsoft.co mwrote in message
news:1A******** *************** ***********@mic rosoft.com...
Hi there

We are trying to build a C sharp solution in Visual Studio 2005
Professional.

We have a number of other assemblies, that do not form part of the
solution.

Assemblies that do form part of the solution have been referenced using
the
Projects tab in the Add Reference dialog.

Assemblies that do not form part of the solution have been added usingthe
Browse tab.

The problem is that when we do a Release build, it still references the
Debug build assemblies of the non solution projects, rather than the
release
assemblies.

Is there any way of forcing the references to use Debug/Release assemblies
for the "browsed" assemblies as appropriate?

Thanks in advance

Hugh


Oct 30 '07 #5
Hugh wrote:
Thanks for the prompt reply, Bryan.

This could work for us if the location you talk about can have both a
release and a debug build assembly in it - is this possible without changing
the asembly names?

Hugh
Yes you can, but you have to edit the project file by hand. Open the
*.csproj files in a text editor and look for the reference to your DLL.
Here's an example if you would reference "nstl.dll":

<Reference Include="nstl, ....">
<SpecificVersio n>False</SpecificVersion >
<HintPath>..\.. \..\nstl\bin\De bug\nstl.dll</HintPath>
</Reference>

Now simply replace the debug part of the hint path:

<HintPath>..\.. \..\nstl\bin\$( Configuration)\ nstl.dll</HintPath>

This will tell msbuild (the build engine under Visual Studio) to replace
"$(Configuratio n)" with "Debug" or "Release" according to the current
configuration

HTH,
Andy
--
You can email me by removing the NOSPAM parts below:
xm**********@gm xNOSPAM.net
Oct 30 '07 #6
Thanks Andreas!

Not quite the "built in" solution, but a workable one.

Hugh

"Andreas Mueller" wrote:
Hugh wrote:
Thanks for the prompt reply, Bryan.

This could work for us if the location you talk about can have both a
release and a debug build assembly in it - is this possible without changing
the asembly names?

Hugh

Yes you can, but you have to edit the project file by hand. Open the
*.csproj files in a text editor and look for the reference to your DLL.
Here's an example if you would reference "nstl.dll":

<Reference Include="nstl, ....">
<SpecificVersio n>False</SpecificVersion >
<HintPath>..\.. \..\nstl\bin\De bug\nstl.dll</HintPath>
</Reference>

Now simply replace the debug part of the hint path:

<HintPath>..\.. \..\nstl\bin\$( Configuration)\ nstl.dll</HintPath>

This will tell msbuild (the build engine under Visual Studio) to replace
"$(Configuratio n)" with "Debug" or "Release" according to the current
configuration

HTH,
Andy
--
You can email me by removing the NOSPAM parts below:
xm**********@gm xNOSPAM.net
Oct 31 '07 #7

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

Similar topics

0
1299
by: bnc mag | last post by:
Hello, Visual Studio 6 allows users to specify seperate post-build steps to perform on Debug and Release builds. I am trying to do the same thing in C#.NET 2003, but it appears as though I only get to specify *one* set of post-build steps, regardless of whether I am building in Debug or Release. I would like to copy my resulting DLLs into respective "Debug" and "Release" directories elsewhere on my machine, hence my need for such a
12
6112
by: Vasco Lohrenscheit | last post by:
Hi, I have a Problem with unmanaged exception. In the debug build it works fine to catch unmanaged c++ exceptions from other dlls with //managed code: try { //the form loads unmanaged dlls out of which unmanaged exception //get thrown
4
1003
by: samariton | last post by:
We distributed an VS6 "C" executable.(Built on WIN2K with release mode.) Surprisingly we are finding runtime errors for q workflow on all XP m/c and some of the WIN2K systems.All the WIN2K pcs we used for testing never shown any such error. If you have any idea of this strange bahaviour.Please let me know.Appretiate your help in advance. (NOTE: On XP when it throws runtime error,I am able to track the root cause,I am keen to know why is...
2
1420
by: babyx | last post by:
The release build class library can only work with msvcr71d.dll and msvcp71d.dll exist. How to make this class library work on any machine without using the debug dlls? What are the project settings that i need to take note so that it will become a "real" release build without depending on the debug dll? Can anybody help? Posted Via Usenet.com Premium Usenet Newsgroup Services
35
2108
by: Brett Romero | last post by:
I'm using MSBUILD to build release and debug versions of a winform project (VS.NET 2005). The project file has conditionals to file reference DLLs depending on the build configuration (debug or release). The generated EXE PDB file for release is 2KB smaller than the debug version. However, the EXEs are exactly the same size. Release is set to optimize code but why are these EXEs the same size? The program also loads the same with both...
3
1570
by: O.B. | last post by:
In .NET 2005, I have a C# GUI project that is dependent on a C# DLL project. When I compile the GUI project in Release mode, it copies the "debug" version of the DLL into the bin directory of the GUI project. How do I configure the project to copy in the "release" version fo the DLL?
3
1846
by: Russ | last post by:
I have a Web Service that was originally created with .NET VC 2003, and subsequently converted to the 2005 version. It works fine when built as a debug version, and run on the workstation it was built on. Now I want to build a release version so I can deploy it to Windows 2003 server. This project is compiled with "/clr:oldSystax". I've run into several problems and I am not sure all of the things I am discovering are related. Any help...
3
1998
by: TBass | last post by:
Hello, Is there a way to get Visual Studio 2003 look to one directory for debug version dlls when set to DEBUG and then to another directory where I store the release version of a dll when set to RELEASE? My current project uses about 8 dlls I've written in the past, but I don't want to keep re-compiling them for debug/release depending on whether I'm compiling the current project for debug/release.
3
3379
by: =?Utf-8?B?bG10dGFn?= | last post by:
We have developed a number of different applications (ASP.NET web site, Windows services, DLLs, Windows forms, etc.) in C# 2.0. We have developed and unit tested all these applications/components using Debug mode. Now we are ready to compile everything for release to production. However, we don’t know whether we should compile all the applications/components/assemblies using Release mode (or keep everything in Debug mode). We’ve...
0
8776
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
9449
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
9310
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...
1
9236
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
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
6735
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
4550
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...
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.