Is it ok to have inplicit references ? I thought it wasn’t. I created a .net core console app and changed the runtime and sdk version to 2.0 to see what it would do.
Sure it is. There are certain references that EBuild adds automatically to your project, when no matching reference is found. tis includes:
mscorlib.dll and System.Core.dll, in regular (non-Core) .NET projects
Echoes.dll, in .NET projects that reference Elements.dll
the standard Microsoft.NETCore.App or Microsoft.ASPNETCore.App package, in a. NetCore.App or AspNetCore.App project.
In the latter case, the version of the package will be set to the configured NETCoreRuntimeVersion. (Side note, looking at this now wonder whether this needs a [] around the version, to force the implicit reference to exactly match the runtime version…)
This only happens of you don’t have a matching explicit referent to the said dll or package. You can disable implicit package for .NET core. by setting DisableImplicitFrameworkReferences to true.
But: what specific problem are you seeing/trying to solve?
Plain .NET Core should be fully functional. ASP.NET Core is still a work in progress/not officially and fully supported.
I was trying to get a console app to talking to a sql server database using the SqlClient and dapper nugets.
I added Dapper and System.Data.SqlClient and I get these errors
E: Unknown namespace “System.Resources” in uses list [/Users/JohnMoshakis/Documents/develop/Echoes/Core/ConsoleApplication4/Properties/AssemblyInfo.pas (7)]
E: Unknown type “NeutralResourcesLanguage” [/Users/JohnMoshakis/Documents/develop/Echoes/Core/ConsoleApplication4/Properties/AssemblyInfo.pas (19)]
It also looked like debugging wasnt working and I was wondering if the dotnet application was fully integrated.
Could it be that .NET Core just doesn’t support the attributes used in the AssemblyInfo? Did you add any, or is this the unchanged file from template? Does it work if you just remove the namespace from using?
and it compiles fine, .NETCore2.1, Microsoft.NETCore.App runtime, version 2.1.2. What;'s your exact settings? Can I see a details re-build log?
There’s nots of variables here…
General debugging should be working, although I do have a few minor issues open that I need to look at. Can you elaborate on what “wasn’t working” entails, precisely? What fails, what’s the error?
thanx,
marc
ps: unrelated: I did make a couple fixes to package resolving today, one to make the implicit reference hardcoded to the appropriate version, and one to fix (affect non-fatal) “duplicate reference” warnings for .dlls being in both Micrsoft.NETStandard.Library and Microsoft.NETCore.App. I’ expect neither should affect your issue. I also fixed two (purely visual) issues foe the References tree in Fire not refreshing properly/immediately when changing NETCore version, or adding a new reference.
Can you give me a Diagnostic rebuild log log with (failed) and without (successful) the Dapper reference? Or can you send me the project?
Unrelated, let me upload my fixes from from earlier today as a new build, eta ~1h, just so you have that (although I also cant repro the issue with .2353, which is still what I have installed here…
-> Target Echoes started.
D: Ignoring outdated cached data for ResolveReferences (11:09 PM ≥ 11:05 PM)
-> Task RemObjects.EBuild.Elements.ElementsProcessNuGetReferences started for ConsoleApplication5, Echoes.
D: Package Microsoft.NETCore.App found in local cache.
W: Package Microsoft.NETCore.App:2.1.0 has no deliverable for platform 'netcoreapp'.
I’ve improved the logging output here. This one will actually be diced by my new build; it happens because the implicit reference was not specific to a version, so it gets upgraded to the latest (2.2.0 here for me) which, indeed, does not have a deliverable for netcore2.1 (only 2.2).
The build I sent you last night already fixes this, as it pulls in [2.1.0] exactly, which works.
Right now, this issue is ignored (just a warning); and somehow the compiler pulls in the regular mscorlib.dll from Mono (that’s a compiler bug I need to log for Carlo for next week), which is why the build still succeeds.
I’ve now improved logging to show the actual version numbers:
D: Package Microsoft.NETCore.App:2.2.0 found in local cache.
E: Package <NameAndVersion = Microsoft.NETCore.App:2.2.0> has no deliverable for platform 'netcoreapp 2.1'.
and I’ve also made this a failing error instead of a warning, so the build will now fail if a (direct) package reference has. no deliverable. (indirect references without deliverable will remain non-fatal warnings only).
After fixing this, adding Dapper back to the project still/again compiles for me.
Can you retry with the new built from last night? in a short while, I’ll also send you a new build with the additional fixes I made, mainly for the better/more precise logging.