473,387 Members | 1,844 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,387 software developers and data experts.

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 2348
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**@discussions.microsoft.comwrote in message
news:1A**********************************@microsof t.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 PublicAssemblies directory under the
Visual Studio 8 (C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PublicAssemblies 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**@discussions.microsoft.comwrote in message
news:1A**********************************@microsof t.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**@discussions.microsoft.comwrote in message
news:1A**********************************@microsof t.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 PublicAssemblies directory under the
Visual Studio 8 (C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PublicAssemblies 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**@discussions.microsoft.comwrote in message
news:1A**********************************@microsof t.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, ....">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\nstl\bin\Debug\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
"$(Configuration)" with "Debug" or "Release" according to the current
configuration

HTH,
Andy
--
You can email me by removing the NOSPAM parts below:
xm**********@gmxNOSPAM.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, ....">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\nstl\bin\Debug\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
"$(Configuration)" with "Debug" or "Release" according to the current
configuration

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

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

Similar topics

0
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...
12
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...
4
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...
2
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...
35
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...
3
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...
3
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...
3
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.