Delphi 2009 MS Build headaches - delphi

does anyone know of any good description of delphi's build system? (i know it's using MS Build.) i'm using delphi 2009.
i wanted to set up a variation of the Debug build configuration that (often) has different defines (d2009 seems to call them "preprocessor symbols").
the problem i'm having is that--even though i turned off "inherit" for "Base" and "Debug"--have only very limited control. for example, i can't get rid of FastMM_.
<PropertyGroup>
<ProjectGuid>{D7FE7347-8E2C-438C-A275-38B8DA9244B0}</ProjectGuid>
<ProjectVersion>12.0</ProjectVersion>
<MainSource>oca.dpr</MainSource>
<Config Condition="'$(Config)'==''">Debug</Config>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_StringChecks>off</DCC_StringChecks>
<DCC_MinimumEnumSize>4</DCC_MinimumEnumSize>
<DCC_RangeChecking>true</DCC_RangeChecking>
<DCC_IntegerOverflowCheck>true</DCC_IntegerOverflowCheck>
<DCC_UNIT_PLATFORM>false</DCC_UNIT_PLATFORM>
<DCC_SYMBOL_PLATFORM>false</DCC_SYMBOL_PLATFORM>
<DCC_DcuOutput>.\dcu</DCC_DcuOutput>
<DCC_UnitSearchPath>C:\Prj\Lib\AutoQADocking\Delphi2009.Win32\Lib;$(BDS)\Source\DUnit\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<DCC_Optimize>false</DCC_Optimize>
<DCC_DependencyCheckOutputName>oca.exe</DCC_DependencyCheckOutputName>
<DCC_ImageBase>00400000</DCC_ImageBase>
<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
<DCC_Platform>x86</DCC_Platform>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_PentiumSafeDivide>true</DCC_PentiumSafeDivide>
<DCC_Optimize>true</DCC_Optimize>
<DCC_IntegerOverflowCheck>false</DCC_IntegerOverflowCheck>
<BRCC_Defines>MadExcept;FastMM;$(BRCC_Defines)</BRCC_Defines>
<DCC_AssertionsAtRuntime>false</DCC_AssertionsAtRuntime>
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>false</DCC_DebugInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<BRCC_Defines>FastMM</BRCC_Defines>
<DCC_DebugDCUs>true</DCC_DebugDCUs>
<DCC_MapFile>3</DCC_MapFile>
<DCC_Define>DEBUG;FastMM_;madExcept;$(DCC_Define)</DCC_Define>
</PropertyGroup>
i even had to edit it today with notepad to get rid of a DCC define that the delphi UI doesn't seem to give access to. (it said "From Delphi Compiler" for the item i couldn't remove.)
does anyone know a good primer on the use of this feature in delphi?
thank you!

Related

Publish Website Does not Use Transformed web.config

I created a solution containing a website (not WebApp) with VS Express 2013. I use a web.Release.config file for the publish process. That worked well with VS 2013.
Now that I changed to VS 2019 Community, web.Debug.config was used for the web.config transformation though the publish was done for "Release". I suppose that is because in the configuration manager only "Debug" is possible for any configuration.
In another thread I found that I had to change website.publishproj from Debug to Release:
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
Now, web.Release.config is used for the transformation:
"web.config" wurde mithilfe von "C:\Users\<project path>\Web.Release.config" in "C:\Users\<some temporary path>\obj\Release\TransformWebConfig\transformed\web.config" transformiert.
This file actually has the changes applied that are needed for Release.
However, in the destination directory web.config does not contain these changes. It seems to be the original web.config without transformation.
What must I do to make Publish copy the transformed web.config?
This is my .pubxml file:
<?xml version="1.0" encoding="utf-8"?>
<!--
Auto generated comment...
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>C:\Inetpub\vhosts\<website name>.com\httpdocs</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
and here is website.publishproj:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.30319</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{45ff7195-6038-4b17-91ce-611a467ac837}</ProjectGuid>
<SourceWebPhysicalPath>$(MSBuildThisFileDirectory)</SourceWebPhysicalPath>
<SourceWebVirtualPath>/(Source Path Name)</SourceWebVirtualPath>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SourceWebProject>http://localhost:56406</SourceWebProject>
<SourceWebMetabasePath>/IISExpress/7.5/LM/W3SVC/2/ROOT</SourceWebMetabasePath>
</PropertyGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<!-- for VS2010 we need to use 10.5 but for VS2012+ we should use VisualStudioVersion -->
<WebPublishTargetsVersion Condition=" '$(WebPublishTargetsVersion)' =='' and '$(VisualStudioVersion)' == 10.0 ">10.5</WebPublishTargetsVersion>
<WebPublishTargetsVersion Condition=" '$(WebPublishTargetsVersion)'=='' ">$(VisualStudioVersion)</WebPublishTargetsVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(WebPublishTargetsVersion)</VSToolsPath>
<_WebPublishTargetsPath Condition=" '$(_WebPublishTargetsPath)'=='' ">$(VSToolsPath)</_WebPublishTargetsPath>
<AssemblyFileVersion Condition="'$(AssemblyFileVersion)' == ''">1.0.0.0</AssemblyFileVersion>
<AssemblyVersion Condition="'$(AssemblyVersion)' == ''">1.0.0.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<AssemblyAttributes Include="AssemblyFileVersion">
<Value>$(AssemblyFileVersion)</Value>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyVersion">
<Value>$(AssemblyVersion)</Value>
</AssemblyAttributes>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Accessories\Lib\Runtime\BaseLib\BaseLib.csproj">
<Project>{8A827F3E-CA83-4765-988D-937B0B608201}</Project>
<Name>BaseLib</Name>
</ProjectReference>
<ProjectReference Include="..\Accessories\Lib\Runtime\Config\Config.csproj">
<Project>{1B78D777-B4F8-4CEA-9A4F-554807D1E5BF}</Project>
<Name>Config</Name>
</ProjectReference>
<ProjectReference Include="..\Accessories\Lib\Runtime\GardenLib\GardenLib.csproj">
<Project>{30B09928-B911-4803-982F-519C4CDB8860}</Project>
<Name>GardenLib</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(_WebPublishTargetsPath)\Web\Microsoft.WebSite.Publishing.targets" />
</Project>
After I got some more problems publishing my website, I switched back to VS2013 Express where my publish process works well as it did before.
Maybe it's a bug in Visual Studio?

Visual Studio suggests C# 8.0 features, but compiler yields error

In my projects Visual Studio gives me recommendations to use C# 8.0 features for Framework 4.6 projects, even though the default is specified on the Microsoft documentations to be 7.3. An example of one of the suggestions:
var i1 = "";
var i2 = "";
i1 = i1 ?? i2; //suggests i1 ??= i2;
If I let VS correct the suggestions the IDE shows me no errors or warnings, but the moment I build I get a compiler error.
I know I can change the langversion in the .csproj file to get it to work, but that's not the point.
Why do I get suggestions and then proceed to get no errors until compilation?
In my memory I used to get suggestions to automatically upgrade the project to the langversion for 7.X features in the past, if I wanted to use features from that version.
Example of one of the .csproj files:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{00000000-0000-0000-0000-000000000000}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>MyProject</RootNamespace>
<AssemblyName>MyProject</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
//... References & compilation files
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Updating the Microsoft.Net.Compilers NuGet package worked for me.
I updated from 2.10.0 to 3.11.0.

error MT1108: Could not find developer tools for this device

I have an Xamarin iOS application that can run fine on my device when I start the application on "Debug" configuration. Now I created a new configuration called "Staging" and duplicated the info.plist and entitlements.plist as info-Staging.plist and entitlements-Staging.plist and want to use those while debugging in the "Staging" configuration. The only difference between them is a different identifier (com.blah.blah). I edited the .csproj as so:
<ItemGroup>
<None Include="packages.config" />
<None Include="Entitlements.plist" Condition="'$(Configuration)' != 'Staging'" />
<None Include="Info.plist" Condition="'$(Configuration)' != 'Staging'" />
<None Include="Info-Staging.plist" Condition="'$(Configuration)' == 'Staging'">
<LogicalName>Info.plist</LogicalName>
</None>
<None Include="Entitlements-Staging.plist" Condition="'$(Configuration)' == 'Staging'">
<LogicalName>Entitlements.plist</LogicalName>
</None>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Staging|AnyCPU' ">
<Optimize>false</Optimize>
<OutputPath>bin\Staging</OutputPath>
<DefineConstants></DefineConstants>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<CodesignEntitlements>Entitlements-Staging.plist</CodesignEntitlements>
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
<MtouchLink>SdkOnly</MtouchLink>
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
<AssemblyName>MyApp.iOS</AssemblyName>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineConstants>DEBUG;ENABLE_TEST_CLOUD;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<ConsolePause>false</ConsolePause>
<DeviceSpecificBuild>true</DeviceSpecificBuild>
<MtouchDebug>true</MtouchDebug>
<MtouchFastDev>true</MtouchFastDev>
<MtouchFloat32>true</MtouchFloat32>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<MtouchTlsProvider>Default</MtouchTlsProvider>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
But when I try to build the app on my device, I get this message:
error MT1108: Could not find developer tools for this 10.2.1 (14D27) device. Please ensure you are using a compatible Xcode version and then connect this device to Xcode to install the development support files.
This Problem is very simple Actually Just check if the Installed Xcode version in your MAC machine and the Xamarin version that you have right now in your System match. For that you need to check in Visual studio as Tools/Options/Xamarin

Install F# 4.1 SDK on build server

I have installed Visual Studio 2017 with F# support on my PC and I have MSBuild targets in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\FSharp and F# 4.1 SDK in C:\Program Files (x86)\Microsoft SDKs\F#\4.1
I have installed Build Tools for Visual Studio 2017 (from https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15 ) but there is no option to install F# SDK so building F# projects using MSBuild 15 fails.
How can I install F# 4.1 SDK without installing Visual Studio?
There is an MSI that can be installed, it's not yet been published on MSDN.
But it will be shortly.
You can track the issue here: on GitHub:
"Deploy FSharp Tools MSI to MSDN #2553"
https://github.com/Microsoft/visualfsharp/issues/2553
Kevin Ransom
A short term fix until the SDK can be installed separately is to add a directive to the project file to look in the NuGet packages folder for the Microsoft.FSharp.Targets file. Here are steps I took to fix this:
Ensure your using the new F# project from VS.NET 2017 as its has this directive:
<Import Project="..\packages\FSharp.Compiler.Tools.4.1.17\build\FSharp.Compiler.Tools.props" Condition="Exists('..\packages\FSharp.Compiler.Tools.4.1.17\build\FSharp.Compiler.Tools.props')" />
Replace this section of the project file:
<Choose>
<When Condition="$(TargetFSharpCoreVersion) >= 4.3.0.0 AND $(TargetFSharpCoreVersion) < 4.3.1.0 ">
<PropertyGroup>
<FSharpTargetsPath>$(MSBuildProgramFiles32)\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<When Condition="$(TargetFSharpCoreVersion) >= 4.3.1.0 AND $(TargetFSharpCoreVersion) < 4.4.0.0 ">
<PropertyGroup>
<FSharpTargetsPath>$(MSBuildProgramFiles32)\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<When Condition="$(TargetFSharpCoreVersion) >= 4.4.0.0 AND $(TargetFSharpCoreVersion) < 4.4.1.0 ">
<PropertyGroup>
<FSharpTargetsPath>$(MSBuildProgramFiles32)\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<FSharpTargetsPath>$(MSBuildProgramFiles32)\Microsoft SDKs\F#\4.1\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
With this XML:
<Choose>
<When Condition="$(TargetFSharpCoreVersion) >= 4.3.0.0 AND $(TargetFSharpCoreVersion) < 4.3.1.0 ">
<PropertyGroup>
<FSharpTargetsPath>$(MSBuildProgramFiles32)\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<When Condition="$(TargetFSharpCoreVersion) >= 4.3.1.0 AND $(TargetFSharpCoreVersion) < 4.4.0.0 ">
<PropertyGroup>
<FSharpTargetsPath>$(MSBuildProgramFiles32)\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<When Condition="$(TargetFSharpCoreVersion) >= 4.4.0.0 AND $(TargetFSharpCoreVersion) < 4.4.1.0 ">
<PropertyGroup>
<FSharpTargetsPath>$(MSBuildProgramFiles32)\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<FSharpTargetsPath>$(MSBuildProgramFiles32)\Microsoft SDKs\F#\4.1\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<!-- This is needed for TeamCity where F# SDK is only available via NuGet right now - hopefully can be removed at some point once the SDK is available for install -->
<PropertyGroup Condition="!Exists('$(FSharpTargetsPath)')">
<FSharpTargetsPath>$(FscToolPath)\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
Ensure you build server has a restore NuGet packages step prior to doing the build
Ensure you packages file includes: FSharp.Compiler.Tools and FSharp.Core
The reason this works is as follows:
This checks to see if the FSharpTargetsPath exists and if not use the packages folder as the source. You don't want to always use the packages folder otherwise on a fresh checkout on a users machine the packages aren't available and the build will fail. For this to work on the build server this assumes you have a step to restore the NuGet packages PRIOR to doing the build.
It seems it's so new things haven't been updated yet.
Four step process for installing for a build server (scroll down to Option 3)
http://fsharp.org/use/windows/
(4.0)
According to the MSDN blog...
https://blogs.msdn.microsoft.com/dotnet/2017/03/07/announcing-f-4-1-and-the-visual-f-tools-for-visual-studio-2017-2/
Seems you at least need .NET Core / CLI
Searching on Microsoft's site doesn't seem to find anything...
Closest thing would be the 4.0 tools:
https://www.microsoft.com/en-us/download/details.aspx?id=48179
There are alse the raw NuGet packages (4.1)
https://www.nuget.org/packages/FSharp.Compiler.Tools
https://www.nuget.org/packages/FSharp.Core
Bottom line: I think its so new it hasn't been released in a format similar to previous versions yet. I'll keep checking every 24 hours to see if they update it on their website.

Best practice of creating Delphi package for different Delphi IDEs

I maintain an open source Delphi Library. I want to have one minimal project file for all Delphi XE series compilers. Ideally, I need a tool that will create one project file for XE6, and that will strip all redundant information and create corresponding project files for XE-XE5 automatically. Is there any smart way to achieve that?
Here is my current project file, which contains much redundant information. For instance, it contains a dummy configuration for Android/iOS etc, but my project is targeting traditional Windows apps. If I manually remove this information, it will come back when the project changes. Also, I know the value of DebugInformation was boolean in XE4, but integer in XE5.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{1118D87C-9E72-4D93-9098-E70AD237493A}</ProjectGuid>
<MainSource>dutil_rtl.dpk</MainSource>
<ProjectVersion>15.1</ProjectVersion>
<FrameworkType>None</FrameworkType>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>3</TargetedPlatforms>
<AppType>Package</AppType>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
<Base_Win64>true</Base_Win64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
<Cfg_1_Win32>true</Cfg_1_Win32>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
<Cfg_1_Win64>true</Cfg_1_Win64>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
<Cfg_2_Win32>true</Cfg_2_Win32>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
<Cfg_2_Win64>true</Cfg_2_Win64>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<DCC_DUPLICATE_CTOR_DTOR>false</DCC_DUPLICATE_CTOR_DTOR>
<GenPackage>true</GenPackage>
<GenDll>true</GenDll>
<RuntimeOnlyPackage>true</RuntimeOnlyPackage>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
<DCC_DcuOutput>..\lib\$(Platform)\$(Config)</DCC_DcuOutput>
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_Optimize>false</DCC_Optimize>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_RemoteDebug>true</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<DCC_RemoteDebug>false</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>false</DCC_DebugInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="rtl.dcp"/>
<DCCReference Include="..\src\dutil.core.Exception.pas"/>
<DCCReference Include="..\src\dutil.core.NonRefCountedInterfacedObject.pas"/>
<DCCReference Include="..\src\dutil.io.device.File_.pas"/>
<DCCReference Include="..\src\dutil.io.device.TempFile.pas"/>
<DCCReference Include="..\src\dutil.io.FileVersion.pas"/>
<DCCReference Include="..\src\dutil.sys.win32.MessageWindowThread.pas"/>
<DCCReference Include="..\src\dutil.sys.win32.Platform.pas"/>
<DCCReference Include="..\src\dutil.sys.win32.Process.pas"/>
<DCCReference Include="..\src\dutil.sys.win32.registry.Reader.pas"/>
<DCCReference Include="..\src\dutil.sys.win32.registry.Validation.pas"/>
<DCCReference Include="..\src\dutil.sys.win32.registry.Writer.pas"/>
<DCCReference Include="..\src\dutil.sys.win32.SpecialPath.pas"/>
<DCCReference Include="..\src\dutil.sys.win32.SubclassingWindow.pas"/>
<DCCReference Include="..\src\dutil.text.arg.Arg.pas"/>
<DCCReference Include="..\src\dutil.text.arg.Arguments.pas"/>
<DCCReference Include="..\src\dutil.text.arg.Builder.pas"/>
<DCCReference Include="..\src\dutil.text.Convert.pas"/>
<DCCReference Include="..\src\dutil.text.json.Json.pas"/>
<DCCReference Include="..\src\dutil.text.json.Reader.pas"/>
<DCCReference Include="..\src\dutil.text.json.Validation.pas"/>
<DCCReference Include="..\src\dutil.text.Util.pas"/>
<DCCReference Include="..\src\dutil.text.xml.Validation.pas"/>
<DCCReference Include="..\src\dutil.time.Time.pas"/>
<DCCReference Include="..\src\dutil.util.concurrent.BlockingQueue.pas"/>
<DCCReference Include="..\src\dutil.util.concurrent.FailSafeThread.pas"/>
<DCCReference Include="..\src\dutil.util.concurrent.Result.pas"/>
<DCCReference Include="..\src\dutil.util.concurrent.Timer.pas"/>
<DCCReference Include="..\src\dutil.util.concurrent.TimerImpl.pas"/>
<DCCReference Include="..\src\dutil.util.concurrent.TimerQueue.pas"/>
<DCCReference Include="..\src\dutil.util.container.DynArray.pas"/>
<DCCReference Include="..\src\dutil.util.digest.Crc32.pas"/>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject>
<Delphi.Personality>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1033</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"/>
<VersionInfoKeys Name="FileDescription"/>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"/>
<VersionInfoKeys Name="LegalCopyright"/>
<VersionInfoKeys Name="LegalTrademarks"/>
<VersionInfoKeys Name="OriginalFilename"/>
<VersionInfoKeys Name="ProductName"/>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"/>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">dutil_rtl.dpk</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k190.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp190.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment/>
<Platforms>
<Platform value="iOSDevice">False</Platform>
<Platform value="iOSSimulator">False</Platform>
<Platform value="Win32">True</Platform>
<Platform value="Win64">True</Platform>
</Platforms>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
</Project>
A single project file may have worked in the old days when everything was based on DPR/DPK files only, but since DPROJ files were introduced a single project will not work anymore. That is because a DPROJ file contains version info, and in some cases node structures, that are different between IDE releases. If you opened a DPROJ in a newer IDE and the file contained an older version/structure, the IDE would upgrade the project. If you then saved the changes to the same file, it would not work in older IDEs anymore.
If you look at any of the major third-party component packages, they maintain different projects for each IDE release, for this reason. You will need to do the same.
Most commercial packages, like DevExpress, and open source components/packages, like SynEdit and the Jedi libraries, use separate project files on the same source code for each version of the IDE. D7, D2010, DXE2...etc.
This allows the providers to use conditional defines to handle varying versions of the IDE's/Platform so that their code will work for the developers.
You will probably need to do the same in order to avoid complex installation instructions for those using your library.
Also, this is pretty much the standard way it is done and people using your library will probably be looking for the appropriately named project file.
Hope this helps.

Resources