Issue with Uri class

Hi, got a real funny one here

Attached are 2 solutions, Oxygene and MS C# both do the same thing but the output is different

Oxygene outputs

C# outputs

can’t figure out why, the C# output is the one I want

Uri class (65.4 KB)

Any help would be really appreciated as I’ve spent ages scratching my head on this as it’s causing problems

This is really strange - same on my system
I decompiled the executables to see the IL - and these are identical …
But the output is not …


The output in IL:

It’s a framework thing (odd but you can override with a config setting)

If you add:

[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.5.2", FrameworkDisplayName := “.NET Framework 4.5.2”)]
to your project, it also acts this way.

The oxygene project has:

The C# project has:

In the compiled executables:

In Oxygene the following line is generated:
Assembly: TargetFramework(".NET,Version=v4.5.2")>

In c# it is generated as:
Assembly: TargetFramework(".NETFramework,Version=v4.5.2", FrameworkDisplayName:=".NET Framework 4.5.2")>

So it looks if the target framework in Oxygene is not generated correctly.

Indeed. Logged & fixed.

1 Like

Thanks guys, this was really doing my head in

Just tested the latest beta - the issue is resolved; the Oxygene code gives now the same output as the C# code without any code changes.