I am trying to tell if my site is running as a debug build or not in asp.net
1.1 you could say
#IF DEBUG
DO SOMETHING HERE
#ENDIF
but in ASP.NET 2.0 it seems not to work anymore... why not?! i have
debug="false" in web config and the debug code still runs... 6 1626
On the Visual Studio menu under Build/Configuration change the active
configuration to "Release". The "debug" code will not be included in the
resulting executable.
"Brian Henry" wrote: I am trying to tell if my site is running as a debug build or not in asp.net 1.1 you could say
#IF DEBUG DO SOMETHING HERE #ENDIF
but in ASP.NET 2.0 it seems not to work anymore... why not?! i have debug="false" in web config and the debug code still runs...
thast what I always did in .NET 1.1 and 1.0 but in 2.0 that doesn't work any
more when you have #if debug directives in it for some reason... my #debug
code always runs release or debug build
"Brad Roberts" <Br************ *****@hotmail.c om> wrote in message
news:4F******** *************** ***********@mic rosoft.com... On the Visual Studio menu under Build/Configuration change the active configuration to "Release". The "debug" code will not be included in the resulting executable.
"Brian Henry" wrote:
I am trying to tell if my site is running as a debug build or not in asp.net 1.1 you could say
#IF DEBUG DO SOMETHING HERE #ENDIF
but in ASP.NET 2.0 it seems not to work anymore... why not?! i have debug="false" in web config and the debug code still runs...
On Tue, 1 Nov 2005 16:51:26 -0500, "Brian Henry" <no****@nospam. com>
wrote: thast what I always did in .NET 1.1 and 1.0 but in 2.0 that doesn't work any more when you have #if debug directives in it for some reason... my #debug code always runs release or debug build
Right - those options aren't available in 2.0.
Are you using a filed based web site or one in IIS? I can see my code
not executing inside #if DEBUG if I turn debugging off and run with
CTRL-F5. Perhaps you could clean out the Temporary ASP.NET files
directory and see what happens.
--
Scott http://www.OdeToCode.com/blogs/scott/
I'm having the same problem. Using the compiler directive #IF DEBUG
around my code, works when debugging, but when I set the
<compilation defaultLanguage ="c#" debug="false">
in web.config for release build, the debug statements still run, ie the
DEBUG constant is still set to true.
Any thoughts or alternative solutions anyone?
Scott Allen wrote: On Tue, 1 Nov 2005 16:51:26 -0500, "Brian Henry" <no****@nospam. com> wrote:
thast what I always did in .NET 1.1 and 1.0 but in 2.0 that doesn't work any more when you have #if debug directives in it for some reason... my #debug code always runs release or debug build
Right - those options aren't available in 2.0.
Are you using a filed based web site or one in IIS? I can see my code not executing inside #if DEBUG if I turn debugging off and run with CTRL-F5. Perhaps you could clean out the Temporary ASP.NET files directory and see what happens.
-- Scott http://www.OdeToCode.com/blogs/scott/
Where do you have this #if test (in ASPX markup or in a code behing file) ?
My first thought would be that you disabled debug for ASPX pages but that
you still have in /bin a code behind DLL compiled in Debug mode...
Is this 1.1 or 2.0 ? Which compilation model are you using ?
---
Patrice
<ro*@stringx.co m> a écrit dans le message de
news:11******** **************@ g49g2000cwa.goo glegroups.com.. . I'm having the same problem. Using the compiler directive #IF DEBUG around my code, works when debugging, but when I set the
<compilation defaultLanguage ="c#" debug="false">
in web.config for release build, the debug statements still run, ie the DEBUG constant is still set to true.
Any thoughts or alternative solutions anyone?
Scott Allen wrote: On Tue, 1 Nov 2005 16:51:26 -0500, "Brian Henry" <no****@nospam. com> wrote:
thast what I always did in .NET 1.1 and 1.0 but in 2.0 that doesn't
work anymore when you have #if debug directives in it for some reason... my
#debugcode always runs release or debug build
Right - those options aren't available in 2.0.
Are you using a filed based web site or one in IIS? I can see my code not executing inside #if DEBUG if I turn debugging off and run with CTRL-F5. Perhaps you could clean out the Temporary ASP.NET files directory and see what happens.
-- Scott http://www.OdeToCode.com/blogs/scott/
Here is some more information: http://odetocode.com/Blogs/scott/arc...1/15/2464.aspx
--
Scott http://www.OdeToCode.com/blogs/scott/
On Tue, 1 Nov 2005 15:24:01 -0500, "Brian Henry" <no****@nospam. com>
wrote: I am trying to tell if my site is running as a debug build or not in asp.net 1.1 you could say
#IF DEBUG DO SOMETHING HERE #ENDIF
but in ASP.NET 2.0 it seems not to work anymore... why not?! i have debug="false " in web config and the debug code still runs... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve Franks |
last post by:
I'm using Visual Studio 2005 RC and cannot figure out how to produce a
"release" build. Am I doing something wrong?
I'm wondering if perhaps MS locked out the ability to produce a release
build when using the RC since it does not have a go-live license? Or maybe
I'm just doing something wrong.
I do not want to go live with a release build. Rather I just want to test
locally to see if there is a performance difference and also to...
|
by: Alan Silver |
last post by:
Hello,
I have been developing ASP.NET with a text editor so far (better way to
learn initially), and have now been trying Visual Web Developer. I want
to create a project for an existing site and add the files to it. I can
add my .aspx and .cs (code-behind) files, but VWD doesn't know which .cs
file si the code-behind for any particular .aspx file.
When you create a new aspx page in VWD, it automatically puts the
code-behind file with...
|
by: Graham |
last post by:
I noticed a similar post awhile ago and in terms of my problem it wasnt a suitable answer so I will ask again.
I have VS2005 running a on development machine in my office where I do all my development on existing and new applications. This environment also has its own Sql Server with dev versions of all our live Databases.
Our live production server also its own Sql Server, these 2 Sql Servers are kept completely separate (for obvious...
|
by: NH |
last post by:
I am a bit confused with the difference between building and publishing a
website using asp.net 2.0.
Currently I build the website up to the server (in the config manager this
is in "Debug" configuration). What is the consequence of doing it this way?
The website works etc but I read that the performance of the website can be
impacted because building it in debug configuration causes the website to not
cache scripts or something like...
|
by: Eric |
last post by:
I have what is hopefully a quick question. I want to have a quick and
easy method for deploying my website to our test environment. I need
something to do nearly the same thing as the "Publish Web Site" option
under the build menu, except I don't want it to copy over the
web.config file. There are a few settings that need to be different,
so I want the publish process to leave the web.config file alone. What
is the easiest way to do...
| |
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++ project.
I then add a class library, and add a reference to this project in the
first project.
When I do a release build, I see the following in the output from the
DLL compile:
/OUT:"C:\Documents and Settings\Andrew\My Documents\Visual Studio
|
by: =?Utf-8?B?TmFkYXYgUG9wcGxld2VsbA==?= |
last post by:
Hi everybody,
I've got a solution that has several dll projects and a website.
For the dll projects I've add a configuration 'debug - no code analysis'.
Now for the website I can't create custom configurations...
The fact that I can't create different configuration for running with code
analysis and without code analysis is irritating, but I could live with it.
|
by: John Kotuby |
last post by:
Hi all,
I am working on what I "thought" was a Web Project in VS 2005 using VB. I
have published the site to an IIS server in our office for testing. When I
hit a runtime error I get a basically unreadable stack trace that shows me
the function or sub where the error occurred plus an offset instead of a
line number.
I created the "project" from the menus with File->New Web Site. All the
documentation says to get line numbers in the...
|
by: Jason |
last post by:
Hi all,
I am no longer able to publish a web site project using Visual Studio 2005
Professional.
I am publishing it to an FTP url, and this used to work just fine.
I enter the username and password and select "passive mode" when publishing
the site, like I have always done. Visual Studio deletes the existing files,
but then doesn't write the new ones, though it tells me the operation was
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |