Hello,
I just installed .NET 5 in my computer, with the Visual Studio 16.8 update.
With Microsoft C#, I can target correctly .NET 5, but it seems that the Elements compiler doesn’t work correctly. A good test is to use the Interlocked.Or static method that is introduced with .NET 5.
In a Microsoft C# application, CC shows the Or method and the call compiles.
In an Oxygene application, CC doesn’t see the Or method and there is an error during build.
It seems that Microsoft changed the package format for .N ET Core again, between RC and final :(. because why not. Fixed for Friday’s build. Also, make sure you did a rebuild after installing a new .NET Core verson, to get the latest 5.0.1 package from remote NuGet.
Can I see the full (diagnostic level) rebuild log?
Yes, thats normal, it lets it to get the best version it can find above 3.0, bit no higher than 5.0.0 (5.1 might be incompatible, after all). The lower range is there because iirc theres we some versions (maybe 3.1) where there was no matching base package yet so it had to fall back to 3.0. That can probably be tweaked more, but it should not be the problem here.
As always, its really tough too tell what the actual problem is because you try hard to provide as little information as possible
I can see that you’re on a Mac, perhaps with the .NET 5 SDK installed manually?
I’m under Windows 10, with the .NET 5 SDK installed automatically with the update 16.8 to Visual Studio. It must be installed correctly, because the same MS C# application is working fine.
In this case, what “more information” can I give you?
You have the test case, what appears on my PC.
I told you really what I think is important.
As I’m not the person who writes the compiler and the tools, I don’t know which information you really need to find the problem… I could write a book or even make a clone of my SSD and send it to you so you have all the information you want, but it’ll be a loss of time and resources. All this work to finally have a “Oh I know what’s happening” without the need to all this information…
I’ve asked TWICE now to see then build log. It works here. how am I supposed to figure out why it resolved the wrong package version for you, if you wont let me see the build log?
AFTER the first information I give to you and your remark about “little information”.
I’m currently reinstalling Elements 2570, so I can give this log in a short time.
1> D: Checking <NuGetRepository file:///C:/Users/Patrick/.nuget/packages/>
1> D: Package Microsoft.NETCore.App.Ref found in repository <NuGetRepository file:///C:/Users/Patrick/.nuget/packages/>
1> D: Available Versions of 'Microsoft.NETCore.App.Ref': 3.1.0.
1> D: Package Microsoft.NETCore.App.Ref:3.1.0 found in repository <NuGetRepository file:///C:/Users/Patrick/.nuget/packages/>.
It seems the problem is your local NuGet cache (not the one we maintain but the one .NET Core itself does) at C:\Users\Patrick.nuget\packages only contains 3.1 and not 5.0. Since we treat that as a proper repository, we count look further for newer versions elsewhere.
That’s not ideal, and I’m not sure how to best fix this, but the more pertinent question tis, why doesn’t this have 5.0, if you did build a 5.0 project in VC#. It looks like I need to revise that logic to also look in “the packs” folder, I’ll investigate.
Why oh why does this crao have to change with every .x build, Microsoft?
Marc,
If you look at my last message, I give you the path where MS C# looks for the .NET Core 3.1 / .NET 5.0 reference assemblies. So you must take a look at this folder.
Perhaps you have nuGet entries for 5.0 because you installed manually the .NET 5.0.100 SDK?