Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4063536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:44:18+00:00 2026-05-20T15:44:18+00:00

I have the following nant task: <!–Compiles the possible release candidate to be used

  • 0

I have the following nant task:

<!--Compiles the possible release candidate to be used for further testing and possible release -->
<target name="createReleaseCandidateJob">
  <xmlpoke file="${nant.project.basedir}/${webApplicationProjectName}/Web.config"
   xpath="/configuration/system.web/compilation/@debug"
   value="false" />
  <exec basedir="." program="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe"
        commandline="-p ${webApplicationProjectName} -v / ${releaseCandidateOutputDir}"
        workingdir="."
        failonerror="true"
      />
  <echo>Completed Compile RC Job</echo>
</target>

I also have the following line of code included in my project:

myVersion = "2.0b";
#if DEBUG
     myVersion = Guid.NewId().ToString();
#endif

this is used when loading certain assets (swf files) by being appended as a querystring parameter and ensures that when debugging a cached version isn’t received but is manageable once released.

However, after what I believed should be compiling a relase build, the version is still being set as a Guid indicating I’m not achieving a release build yet. I’ve checked the web.config and the value of debug is changed to false so I’m assuming I’m missing some setting in the aspnet_compiler.exe arguments, but I cant find anything which indicates such in the documentation.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:44:19+00:00Added an answer on May 20, 2026 at 3:44 pm

    The aspnet_compiler can tell the difference between a debug and ‘retail’ compile using the web.config value, but the conditionals are usually passed as an argument to the compiler (see this) by whatever is driving the build (e.g. Visual Studio, NAnt or whatever). The ASP compiler doesn’t have that, so you need to include them in the codedom section of the web.config file:

    <system.codedom>
      <compilers>
        <compiler
          language="c#;cs;csharp" 
          extension=".cs"
          warningLevel="4"
          compilerOptions="/d:DEBUG"
          type="Microsoft.CSharp.CSharpCodeProvider, 
            System, Version=2.0.0.0, Culture=neutral, 
            PublicKeyToken=b77a5c561934e089" />
        </compilers>
    </system.codedom>
    

    Here, compilerOptions provides the #DEBUG definition you need. That will be picked up by the compiler itself when invoked by aspnet_compiler and should be reflected in the #conditional blocks in your code. So remember to change that as well when you switch the other debug flag in your web.config.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following in a build script: <record action=Start autoflush=true name=${nant.log}/> The name
I have following code that creates Linq query. I've never used Linq until today
I have the following Nant Script snippet. <zip zipfile=${devEnvironment}..\dev-${datetime::get-year(datetime::now())}${datetime::get-month(datetime::now())}${datetime::get-day(datetime::now())}.zip> <fileset basedir=${devEnvironment}> <include name=**/*/> </fileset>
i have following XML <Queue> <UserName>UserName</UserName> <Type>1</Type> <Portal name=Portal1> <IndexesForSelect> <Index>Index1</Index> <Index>Index2</Index> </IndexesForSelect> </Portal>
I have following configuration file - <hibernate-configuration> <session-factory name=HibernateSessionFactory> <property name=hibernate.connection.driver_class>com.mysql.jdbc.Driver</property> <property name=hibernate.connection.password>mysql</property> <property
I have a problem with passing arguments from the NAnt style task to a
I have a build process is in NAnt and resembles the following structure (a
I have following plist: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd>
I have following source. In insertMessage(..), it calls selectMessage to check whether duplicate record
I have following div in a page (I can not modify). <div id=:0.control>Click me</div>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.