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
https://xc.alexfelton.com/cluster/api/sims/Report///diskstation/home/XporterClusterRoot/ClusterData/GcxRepository/EmergeXod/simsnet/Xod/Gcx/SimsNet/SimsReports/gcx_xod_groups.RptDef?id=636034702820000000

C# outputs
https://xc.alexfelton.com/cluster/api/sims/Report/%5C%5Cdiskstation%5Chome%5CXporterClusterRoot%5CClusterData%5CGcxRepository%5CEmergeXod%5Csimsnet%5CXod%5CGcx%5CSimsNet%5CSimsReports%5Cgcx_xod_groups.RptDef?id=636034702820000000

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

Uri class issue.zip (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 …

@ck??

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:
TargetFramework>.NETFramework4.5.2</TargetFramework

The C# project has:
TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion

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.

2 Likes