# Delphi.NET 2007 and project options

**URL:** <https://www.finalbuilder.com/forums/t/delphi-net-2007-and-project-options/3047>\
**Category:** Bugs\
**Created:** [November 6, 2008, 8:55am UTC](https://www.finalbuilder.com/forums/t/delphi-net-2007-and-project-options/3047 "2008-11-06T08:55:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vsxsoft](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/v/848f3c/32.png) [@vsxsoft](https://www.finalbuilder.com/forums/u/vsxsoft)\
**Post date:** [November 6, 2008, 8:55am UTC](https://www.finalbuilder.com/forums/t/delphi-net-2007-and-project-options/3047/1 "2008-11-06T08:55:29Z")

</div>

Hi,

we use finalbuilder to compile some delphi.net 2007 assemblies. We define our own debug/release settings via script code. This means the project settings are ignored. The problem is that delphi.net fills some compiler directives in the project file (dpk).

An delphi.net assembly project file is appended. As you can see there are settings for assertions, optimization, debug info and so on. The finalbuilder task does not change these settings so&nbsp;the settings we change via script code are ignored.

In an delphi.win32 project all works right. Is this a bug in FB or is there a setting to do it?

&nbsp;

TIA

&nbsp;

package XXXX;

{$ALIGN 0}  
{$ASSERTIONS ON}  
{$BOOLEVAL OFF}  
{$DEBUGINFO ON}  
{$EXTENDEDSYNTAX ON}  
{$IMPORTEDDATA ON}  
{$IOCHECKS ON}  
{$LOCALSYMBOLS ON}  
{$LONGSTRINGS ON}  
{$OPENSTRINGS ON}  
{$OPTIMIZATION OFF}  
{$OVERFLOWCHECKS OFF}  
{$RANGECHECKS OFF}  
{$REFERENCEINFO ON}  
{$SAFEDIVIDE OFF}  
{$STACKFRAMES OFF}  
{$TYPEDADDRESS OFF}  
{$VARSTRINGCHECKS ON}  
{$WRITEABLECONST OFF}  
{$MINENUMSIZE 1}  
{$IMAGEBASE $400000}  
{$IMPLICITBUILD OFF}  
{$DEFINE CLR}  
{$DEFINE DEBUG}

...

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [November 7, 2008, 12:27pm UTC](https://www.finalbuilder.com/forums/t/delphi-net-2007-and-project-options/3047/2 "2008-11-07T12:27:55Z")

</div>

Hi   
  
 You are correct, the [delphi.net](http://delphi.net) action does not update the package source. I think the reason I left that out was because I could never get the IDE to make any changes to those settings in the package file either. I have added this functionality to the action, I’ll post here when a new build is available with the change.

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [November 7, 2008, 3:49am UTC](https://www.finalbuilder.com/forums/t/delphi-net-2007-and-project-options/3047/3 "2008-11-07T03:49:06Z")

</div>

Here’s the build with the update package source option :   
  
 [https://www.finalbuilder.com/downloads/finalbuilder/620/FB620\_1131.exe](https://www.finalbuilder.com/downloads/finalbuilder/620/FB620_1131.exe)

---

<div class="post-metadata">

**Author:** ![vsxsoft](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/v/848f3c/32.png) [@vsxsoft](https://www.finalbuilder.com/forums/u/vsxsoft)\
**Post date:** [November 7, 2008, 8:30am UTC](https://www.finalbuilder.com/forums/t/delphi-net-2007-and-project-options/3047/4 "2008-11-07T08:30:07Z")

</div>

Hi,

i have tried the build you provided. I think there are some errors. The original dpk looks like this:

> package XXXXX;
> 
> {$ALIGN 0}  
> {$ASSERTIONS ON}  
> {$BOOLEVAL OFF}  
> {$DEBUGINFO ON}  
> {$EXTENDEDSYNTAX ON}  
> {$IMPORTEDDATA ON}  
> {$IOCHECKS ON}  
> {$LOCALSYMBOLS ON}  
> {$LONGSTRINGS ON}  
> {$OPENSTRINGS ON}  
> {$OPTIMIZATION OFF}  
> {$OVERFLOWCHECKS OFF}  
> {$RANGECHECKS OFF}  
> {$REFERENCEINFO ON}  
> {$SAFEDIVIDE OFF}  
> {$STACKFRAMES OFF}  
> {$TYPEDADDRESS OFF}  
> {$VARSTRINGCHECKS ON}  
> {$WRITEABLECONST OFF}  
> {$MINENUMSIZE 1}  
> {$IMAGEBASE $400000}  
> {$IMPLICITBUILD OFF}  
> {$DEFINE CLR}  
> {$DEFINE DEBUG}

The modified dpk:

> package XXXX;
> 
> ALIGN  
> {$ASSERTIONS OFF}  
> {$BOOLEVAL OFF}  
> {$DEBUGINFO OFF}  
> {$EXTENDEDSYNTAX ON}  
> {$IMPORTEDDATA ON}  
> {$IOCHECKS OFF}  
> {$LOCALSYMBOLS OFF}  
> {$LONGSTRINGS ON}  
> {$OPENSTRINGS ON}  
> {$OPTIMIZATION OFF}  
> {$OVERFLOWCHECKS OFF}  
> {$RANGECHECKS OFF}  
> {$REFERENCEINFO OFF}  
> {$SAFEDIVIDE OFF}  
> {$STACKFRAMES OFF}  
> {$TYPEDADDRESS OFF}  
> {$VARSTRINGCHECKS ON}  
> {$WRITEABLECONST OFF}  
> {$MINENUMSIZE 1}  
> {$IMAGEBASE $00400000}  
> {$IMPLICITBUILD OFF}  
> {$DEFINE CLR}  
> {$DEFINE DEBUG}

As you can see the align setting isnt correct. Can you please fix this?

&nbsp;

TIA

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [November 10, 2008, 3:59am UTC](https://www.finalbuilder.com/forums/t/delphi-net-2007-and-project-options/3047/5 "2008-11-10T03:59:30Z")

</div>

Hi

Here's a build with the fix :

[https://www.finalbuilder.com/downloads/finalbuilder/620/FB620\_1137.exe](https://www.finalbuilder.com/downloads/finalbuilder/620/FB620_1137.exe)

&nbsp;

---

<div class="post-metadata">

**Author:** ![vsxsoft](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/v/848f3c/32.png) [@vsxsoft](https://www.finalbuilder.com/forums/u/vsxsoft)\
**Post date:** [November 11, 2008, 9:40am UTC](https://www.finalbuilder.com/forums/t/delphi-net-2007-and-project-options/3047/6 "2008-11-11T09:40:53Z")

</div>

This build fixes the problem. Thanks.
