Oxygene Visual studio 10.0.0.2525 issues

Hello,
with the new stable build 10.0.0.2525 we have also new issues, could someone take a look and consider please ? Im not sure how to handle this.

We run with:
true

  1. Uknown identifier on const class aliases defined in separate assembly

Arch001.AddParameter(‘I_MAZAT’, dtBoolean, iotInput, I_MAZAT);

dtBoolean/iotInput is defined in separate unit, assembly like this:

  1. On Solution open, there is a new pane ResolveReferences flashing with many information wich might point to the cause of previous issue, but I dont understand it
    > Reference ‘mscorlib’ was resolved to ‘C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.8\mscorlib.dll’ for target ‘Echoes’.

E: Collection was modified; enumeration operation may not execute.
← Task RemObjects.EBuild.Elements.ElementsResolveEchoesReferencesForTarget failed with exception Collection was modified; enumeration operation may not execute. for TescoSW.DigitalSignature.FPC, Echoes, took 0,0000s (24.538s).
← Target Echoes failed.
← Task RemObjects.EBuild.Elements.ElementsResolveReferences failed for TescoSW.DigitalSignature.FPC, took 24,5395s (24.567s).
Missing project ‘TescoSW.DigitalSignature.FPC.elements’ referenced from ‘TescoSW.DigitalSignature.FPC.Asic’, but project path ‘D:\Jadro\DEV\CryptoNativeApp\TescoSW.DigitalSignature\TescoSW.DigitalSignature.FPC.elements’ is valid.
Missing project ‘TescoSW.DigitalSignature.FPC.Xades.elements’ referenced from ‘TescoSW.DigitalSignature.FPC.Asic’, but project path ‘D:\Jadro\DEV\CryptoNativeApp\TescoSW.DigitalSignature\TescoSW.DigitalSignature.FPC.Xades.elements’ is valid.
→ Task RemObjects.EBuild.Elements.ElementsApplyLegacySettings started for TescoSW.DigitalSignature.FPC.Asic, Echoes.
Mapping SuppressWarnings=PW12, H10 to SuppressedWarnings in Target Echoes
Mapping DefineConstants=DEBUG to ConditionalDefines in Target Echoes
Mapping AssemblyName=TescoSW.DigitalSignature.FPC.Asic to BinaryName in Target Echoes
← Task RemObjects.EBuild.Elements.ElementsApplyLegacySettings finished for TescoSW.DigitalSignature.FPC.Asic, Echoes, took 0,0100s (0.009s).
→ Task RemObjects.EBuild.Elements.ElementsSanityCheck started for TescoSW.DigitalSignature.FPC.Asic, Echoes.
← Task RemObjects.EBuild.Elements.ElementsSanityCheck finished for TescoSW.DigitalSignature.FPC.Asic, Echoes, took 0,0000s (0.000s).
→ Task RemObjects.EBuild.Elements.ElementsPreparePlatforms started for TescoSW.DigitalSignature.FPC.Asic.
Preparing target ‘Echoes’ (platform ‘Echoes’).
D: Target-specific Settings, before prepare
D: - <BinaryName = TescoSW.DigitalSignature.FPC.Asic [Target: Echoes]>
D: - <ConditionalDefines = DEBUG [Target: Echoes]>
D: - <Mode = Echoes [Target: Echoes]>
D: - <SuppressedWarnings = PW12, H10 [Target: Echoes]>
→ Task RemObjects.EBuild.Elements.ElementsPreflightEchoes started for TescoSW.DigitalSignature.FPC.Asic.
Reference Assemblies base path is ‘C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework’,
← Task RemObjects.EBuild.Elements.ElementsPreflightEchoes finished for TescoSW.DigitalSignature.FPC.Asic, took 0,0020s (0.001s).
→ Task RemObjects.EBuild.Elements.ElementsPrepareEchoesPlatform started for TescoSW.DigitalSignature.FPC.Asic, Echoes.
Reference Assemblies path for .NETFramework is ‘C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework’,
← Task RemObjects.EBuild.Elements.ElementsPrepareEchoesPlatform finished for TescoSW.DigitalSignature.FPC.Asic, Echoes, took 0,0000s (0.002s).
D: Target-specific Settings, after prepare
D: - <BinaryName = TescoSW.DigitalSignature.FPC.Asic [Target: Echoes]>
D: - <ConditionalDefines = DEBUG [Target: Echoes]>
D: - <IDE:TargetInfo = .NETFramework4.8 (compatible with netstandard2.0) [Target: Echoes]>
D: - <ImpliedConditionalDefines = NET;NET48 [Target: Echoes]>
D: - <Mode = Echoes [Target: Echoes]>
D: - <NETStandardVersion = 2.0 [Target: Echoes]>
D: - <NuGetPlatformName = net [Target: Echoes]>
D: - <NuGetPlatformVersion = 4.8 [Target: Echoes]>
D: - <SubMode = .NET [Target: Echoes]>
D: - <SuppressedWarnings = PW12, H10 [Target: Echoes]>
D: - <TargetFrameworkName = .NETFramework [Target: Echoes]>
D: - <TargetFrameworkNameLong = .NETFramework,Version=v4.8 [Target: Echoes]>
D: - <TargetFrameworkReferenceAssembliesBasePath = C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework [Target: Echoes]>
D: - <TargetFrameworkReferenceAssembliesPath = C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.8 [Target: Echoes]>
D: - <TargetFrameworkVersion = 4.8 [Target: Echoes]>
← Task RemObjects.EBuild.Elements.ElementsPreparePlatforms finished for TescoSW.DigitalSignature.FPC.Asic, took 0,0050s (0.004s).
→ Task RemObjects.EBuild.Elements.ElementsCheckForTargetlessReferences started for TescoSW.DigitalSignature.FPC.Asic.
← Task RemObjects.EBuild.Elements.ElementsCheckForTargetlessReferences finished for TescoSW.DigitalSignature.FPC.Asic, took 0,0000s (0.000s).
→ Task RemObjects.EBuild.Elements.ElementsResolveReferences started for TescoSW.DigitalSignature.FPC.Asic.
→ Target Echoes started.
→ Task RemObjects.EBuild.Elements.ElementsResolveEchoesReferencesForTarget started for TescoSW.DigitalSignature.FPC.Asic, Echoes.
Project ‘TescoSW.DigitalSignature.FPC’ referenced from ‘TescoSW.DigitalSignature.FPC.Asic’ is not enabled and has no cached final output. Falling back to hint path.
D: Cache file ‘C:\Users\TumaL\AppData\Local\RemObjects Software\EBuild\Obj\TescoSW.DigitalSignature.FPC-08C2B79EFF337B58E740E7B4CA63530D1AF31430\Unknown\FinalOutput.xml’ does not exist.
E: Project Reference ‘TescoSW.DigitalSignature.FPC.elements’ could not be resolved for target ‘Echoes’ (Echoes .NET anycpu).
Project ‘TescoSW.DigitalSignature.FPC.Xades’ referenced from ‘TescoSW.DigitalSignature.FPC.Asic’ is not enabled and has no cached final output. Falling back to hint path.
D: Cache file ‘C:\Users\TumaL\AppData\Local\RemObjects Software\EBuild\Obj\TescoSW.DigitalSignature.FPC.Xades-0E45A031D05F17CA78402E58C97134772D5775C4\Unknown\FinalOutput.xml’ does not exist.
E: Project Reference ‘TescoSW.DigitalSignature.FPC.Xades.elements’ could not be resolved for target ‘Echoes’ (Echoes .NET anycpu).
→ Task RemObjects.EBuild.Elements.ElementsProcessNuGetReferences started for TescoSW.DigitalSignature.FPC.Asic, Echoes.
← Task RemObjects.EBuild.Elements.ElementsProcessNuGetReferences finished for TescoSW.DigitalSignature.FPC.Asic, Echoes, took 0,0000s (0.000s).
– Task RemObjects.EBuild.Elements.ElementsProcessComReferences skipped for TescoSW.DigitalSignature.FPC.Asic, Echoes, condition not met.
– Task RemObjects.EBuild.Elements.ElementsProcessSdkReferences skipped for TescoSW.DigitalSignature.FPC.Asic, Echoes, condition not met.

It does not look like, there is a reference resolution problem when building: See the trimmed project build log.
Simply i dont understand if there is a problem with compiler or reference resolution or ? With previous build 2461 is all just fine.

Thank you.

sjBuild.txt (819.3 KB)

You will need to mark you global vars and costs as public for them to be visible outside the assembly; this is an as-deisgned change (actually a bug fix. as the visibility was accidentally wrong, before).

It doens’t; this new Resolve log is a feature of our new project system in .2525

That’s normal.

That one does sound like a bug — but none we have ever sene before (and the reference resolver has bene in use for years now, form Fire and Water). Does this happen every time, and of so, could we get the project that shows this via PM?

thanx!

And can you define how to do that ? According to the wiki Global variables - Free Pascal wiki
global variables are defined in an interface section (outside of procedures), which i is correct in our case:

unit OWDataTypes;
interface
uses ...

var 
  null         :Variant := nil; 

const    
  dtUnknown     =  OWDataType.Unknown;
  dtString		=  OWDataType.String;
  dtInteger		=  OWDataType.Integer;
  dtBCD			=  OWDataType.Decimal;
  dtDecimal     =  OWDataType.Decimal;

Good news.
Tried ,
var
null :Variant := nil; public;
didnt work at first. Now Ive found its not working because of Legacy.targets.
Getting rid of Legacy.targets is the reason of testing 2525 so probably when i stick together migration to 2525 and trashing Legacy.targets It might work for us, ill see after some more tests.

One more annoying issue is the <HintPath> required on <ProjectReference>
It always contains a subfolder with build configuration, which is not resolved with another build configuration ie: Relase .

.\Debug\AppServer\TescoSW.Global.DataTypeUtils.dll

Substitution for $(Configuration) is not working. Ending with: Error () Project Reference ‘…\Global\Source\TescoSW.Global.csproj’ could not be resolved for target ‘Echoes’ (Echoes .NET anycpu).

Curious. Legacy.targets shoukld not affect the compiler behavior for this; what error did you get?

HintPath should not be required if the project path and guid are correct.

Hmm, can you give us a concrete testcase for that? is this with all Elements projects, or a m ix of Elements and VC#/VB?

Another discovery made:
new system diferently processes imports we use:

Where do we define targets and props common for all projects like this:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TEAFVersion>2002</TEAFVersion>
<DefineConstants>$(DefineConstants);TEAF$(TEAFVersion);TEAF2002PLUS;TEAF2001PLUS;</DefineConstants>
</PropertyGroup>
</Project>

Previously worked:
<ItemGroup Condition="$(TEAFVersion)>1505">
<Reference>...</Reference>
</ItemGroup>
where the condition was evaluated correctly according to imported prop value.
With thsi version now, Visual Studio with your extension Removes te conditional ItemGroups and stacks all References under just one ItemGroup. (Since Condtional Itemgroups it is not a proper msbuild compatible solution, I’m also fine with the automatic conversion)
But, when I tried to make a msbuild compatible solution with:

<Choose>
 <When Condition="'$(TEAFVersion)>2000'">
  <ItemGroup >
            <Reference Include="TescoSW.OW.Abstractions">
                <HintPath>..\.\References\TescoSW.OW.Abstractions.dll</HintPath>
                <Private>false</Private>
            </Reference>
        </ItemGroup>
    </When>
</Choose>

process this still ends with error MSB4086: A numeric comparison was attempted on “$(TEAFVersion)” that evaluates to “” instead of a number, in condition “$(TE
AFVersion)>1404” . TEAFVersion is not defined yet.

Yes, this is not and will not be supported by EBuild, I’m afraid.

Hm, but why so ? We compile all codes via msbuild, where all this works. Why cant you use msbuild processed project for reference resolution instead as using it just as a text file ? Why dou you bother with hosting in msbuild at all, when dont want to use these benefits ?

Because we have our own build system, EBuild, which is easier to maintain and expand, gives us way more control and does a lot of things that MSBuild does not do.

Because Visual Studio requires it; the only thing we use MSBuild for is running our EBuild task when building inside Visual Studio.