Elements .2525: ASP.NET Core 3 application broken?

Hello,
Just create a new ASP.NET Core 3 application, add to it an empty class file and build:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\RemObjects Software\Elements\RemObjects.Elements.targets(53,3): error : Reference ‘System’ could not be resolved for target ‘Echoes’ (Echoes .NETCore anycpu).

At build step, a reference to System is added:
image

It seems that it occurs only if I don’t add a reference to the solution.

After I added a reference, CC is not working: “uses Sys” + Ctrl+Space doesn’t list the System namespace!

Well, don’t add System as reference to your .NET Core project — that’d be as designed? :woman_shrugging:t3:

I don’t added a reference to System, but a reference to System.CommandLine.

Hmm, and that adds a reference to System.dll to the project? VS or Water?

fwiw, I cant reproduce this:

image

No, it’s building the project, before adding an empty source file, that adds the System reference, as said in the first post.

VS2019, I can’t reproduce it with Water.
This is perhaps due to the changes Viktoria made on references management…

To be complete, I’m not adding a standard RemObject new file, but one that is created with the following template: OsCodeFile.zip (1.1 KB)
But I don’t see something special on this template.

So to be clear:

  • you create a ASP.NET Core project.
  • it builds clean, has no System reference
  • you add a new file to it with the attached template
  • it gets the new System reference

and nothing else, no missing step?

Step 1: an ASP.NET Core Empty Web Application
Step 5: and it no more builds

Just tried again: no more steps!

Ok, and adding a class file using the NORMAL template does not make it fail?

No, it doesn’t fail.

The custom template is the one I use for about 14 years working with Oxygene, and this is the only case where I have a problem with.

As soon as the template is used, VS adds a reference to System to the elements file (but doesn’t display it immediately). If I remove manually the reference, the project builds fine.

Thanks, logged as bugs://84534

bugs://84534 got closed with status fixed.