473,325 Members | 2,480 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,325 software developers and data experts.

How do I choose debug/release version of C# DLL?

I've written a C# DLL that I want to include in my other C# projects. What I
want to do is include the Debug version of the DLL when I am building the
other apps in debug mode and Release version of the DLL when I'm building in
release mode. This is quite easy to do in VC++ using various macros that are
available in the project file. I can't seem to do the same thing when using
a C# DLL in a C# project. Is there a way to do this?
Nov 16 '05 #1
3 2077
Peter,

In this case, you would just want to include the actual project in the
solution which contains the other project. This way, it will inherit all of
the project settings and you will run in the appropriate mode.

Otherwise, you will have to change the references each time, since you
won't be able to store the two dlls in the same directory.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Peter Steele" <ps*****@z-force.com> wrote in message
news:uz**************@TK2MSFTNGP10.phx.gbl...
I've written a C# DLL that I want to include in my other C# projects. What
I want to do is include the Debug version of the DLL when I am building
the other apps in debug mode and Release version of the DLL when I'm
building in release mode. This is quite easy to do in VC++ using various
macros that are available in the project file. I can't seem to do the same
thing when using a C# DLL in a C# project. Is there a way to do this?

Nov 16 '05 #2
So I take it you cannot use macros like $(IntDir) in C# like you can in
VC++?

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:u4**************@TK2MSFTNGP14.phx.gbl...
Peter,

In this case, you would just want to include the actual project in the
solution which contains the other project. This way, it will inherit all
of the project settings and you will run in the appropriate mode.

Otherwise, you will have to change the references each time, since you
won't be able to store the two dlls in the same directory.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Peter Steele" <ps*****@z-force.com> wrote in message
news:uz**************@TK2MSFTNGP10.phx.gbl...
I've written a C# DLL that I want to include in my other C# projects.
What I want to do is include the Debug version of the DLL when I am
building the other apps in debug mode and Release version of the DLL when
I'm building in release mode. This is quite easy to do in VC++ using
various macros that are available in the project file. I can't seem to do
the same thing when using a C# DLL in a C# project. Is there a way to do
this?


Nov 16 '05 #3
Peter,

No, macros are not supported in this manner. However, in VS.NET 2005,
the build system in VS.NET is MSBUILD, which is completely configurable, so
you could do something like this, if you wanted.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Peter Steele" <ps*****@z-force.com> wrote in message
news:uu**************@tk2msftngp13.phx.gbl...
So I take it you cannot use macros like $(IntDir) in C# like you can in
VC++?

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:u4**************@TK2MSFTNGP14.phx.gbl...
Peter,

In this case, you would just want to include the actual project in the
solution which contains the other project. This way, it will inherit all
of the project settings and you will run in the appropriate mode.

Otherwise, you will have to change the references each time, since you
won't be able to store the two dlls in the same directory.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Peter Steele" <ps*****@z-force.com> wrote in message
news:uz**************@TK2MSFTNGP10.phx.gbl...
I've written a C# DLL that I want to include in my other C# projects.
What I want to do is include the Debug version of the DLL when I am
building the other apps in debug mode and Release version of the DLL
when I'm building in release mode. This is quite easy to do in VC++
using various macros that are available in the project file. I can't
seem to do the same thing when using a C# DLL in a C# project. Is there
a way to do this?



Nov 16 '05 #4

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

Similar topics

3
by: Raphael Zulliger | last post by:
Hi I have to check wheter a .py script is run within the debug or the release version of an embedded python interpreter (in short, wheter python24_d.dll or python24.dll is in use). long...
6
by: ss | last post by:
Hi I built an exe in console debug mode & Release mode . The console debug mode -exe works fine ...but the release mode EXE starts well but fails mid way . The exe is being started as a...
5
by: David++ | last post by:
Hi there, I have built a DLL in Visual C++ 6. When I build the DLL it builds fine for the debug version of the DLL (and this DLL works fine), however, I seem unable to build a Release version of...
9
by: dee | last post by:
Hi I'm about to upload my site and I have switched to release version. Is that enough or do I still need to disable <compilation defaultLanguage="vb" debug="true" /> the debug="true" in the .pdb...
3
by: | last post by:
Since I need to dotfuscate my exe file anyway, does it make any difference if I use Debug or Release versions. Would a Debug version be easier to decompile/study/reverse engineer than a Release...
1
by: mike2036 | last post by:
I have a very strange problem trying to link the debug version of my caller application with one of my DLL's using .NET 2K5. The linker declares the following error (one of many): error...
2
by: Epetruk | last post by:
Hello, I have a problem where an application I am working on throws an OutOfMemoryException when I run it in Release mode, whereas it doesn't do this when I am running in Debug. The...
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.