InvalidProgramException when using : (colon) within Task method with await’s

(alexfelton) #1

IDE: VS2015
See attached Program.pas file

Expected Behavior:

Actual Behavior:

Compile and run, you should get
System.InvalidProgramException: Common Language Runtime detected an invalid program.

Program.pas (1.1 KB)


(RemObjects) #2

Thanks, logged as bugs://76189

(Carlo Kok) #3


can you try the 8.4 betas? I can’t reproduce this with latest.

(RemObjects) #4

bugs://76189 got closed with status cannotrepro.

(alexfelton) #5

Finally got a chance to test this using latest beta and it is no longer an issue, but it’s definitely a issue in current release

(alexfelton) #6

Seems a variation of this bug is present in current compiler, but this time only effects usage of colon with a sequence. Attached is example
Program.pas (823 Bytes)

Also wondering if there has been any progress on the issue with not being able to Reference an Oxygene project in a csproj project using VS2017, I know it’s something in the csharp VsProject object, but were you able to determine what it didn’t like or is it an issue in the latest csproj.dll that’s blocking you?

(RemObjects) #7

Thanks, logged as bugs://78498

(viktoriad) #8

Hello Alex,

We didn’t fix the issue but you can use next workaround:
Open the .csproj file in any text editor and add next block to it:

    <ProjectReference Include="..\ClassLibrary1\ClassLibrary1.elements">

Change the path into proper path for your oxygene project, and the guid is a ProjectGuid property from the Oxygene project. Than reload the solution in VS2017. It gives you working CC and the project will compile too.
We will let you know when we have proper fix for your issue.

Best regards.

(alexfelton) #9

Hi viktoriad
Thanks for reply.
I had already used your suggestion but I was hitting the issue in an IDE SDK project that manipulates the projects through the COM interfaces and I guess I’m also experiencing the same problem you are. Would be interested if you manage to find a solution


(RemObjects) #10

bugs://78498 got closed with status fixed.