.Net Core Notes and Links - kevinsea/Insight.Database GitHub Wiki
With .Net Core coming soon, these links are probably useless
Great Reads:
-
This is the best explanation of Core that I've seen: https://blogs.msdn.microsoft.com/dotnet/2016/02/10/porting-to-net-core/
-
Getting Started Doc https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/using-on-windows
-
Discusses platform, standard, etc https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md
-
https://docs.microsoft.com/en-us/dotnet/articles/core/porting/libraries
Things you must do to get a Core build going
- Do everything required by this doc: https://docs.microsoft.com/en-us/dotnet/articles/core/windows-prerequisites
- Install the stuff here Note VS 2015 Update 3 is now 3.3 (they keep tweaking it)
- From command line at project level. Run
- "DotNet restore"
- "DotNet build"
- There are now 2 solution files (its a messy point w/ core that will be resolved in Core 1.2).
- The normal one is Desktop centric and requires the above commands to compile Core.
- The one ending in -Core compiles both. It is very cranky...when you an error of "An item with the same key has already been add", two things seems to fix it:
- delete project.lock.js or - run 'dotnet restore --no-cache'
Conversion stuff:
- http://packagesearch.azurewebsites.net/ is essential because it helpe finding libs and tells you what's been ported
- helpful: http://www.michael-whelan.net/porting-dotnet-framework-library-to-dotnet-core/ https://blogs.msdn.microsoft.com/dotnet/2012/08/28/evolving-the-reflection-api/
- Add a project.json and a global.json file.
Another way to analyze what left:
- Do an old school build in VS
- Run Analyzer for .Net compatibility: https://visualstudiogallery.msdn.microsoft.com/1177943e-cfb7-4822-a8a6-e56c7905292b
Notes:
- Worth reading - https://www.microsoft.com/net/core#windows
Issues:
- DbProviderFactory: Some issues. Impact appears small (See https://github.com/dotnet/corefx/issues/4571)
- This has some good help with type issues http://www.tsjensen.com/blog/post/2016/08/03/ServiceWire-on-NET-Core
Breaking Changes:
- System.Data.DataException used in a few places...create a similar one? docs .
- Throw an InsightDataException? Small breaking change.
- Glimpse is broken for Core (missing Datacontract factory)
- The finding constructor/method by signature is a bit weaker for Core
- SQL Geometry does not exist and UDT have no/limited support. Most of the Bulk Copy tests fail because of a geo field in the bulk table
TODO:
- Write tests for the Platform compatibility methods
- Review the TODO's in the code :)
Compiler Flags: (Complicated because while we are fixing Core bugs we are compiling the new code on desktop to catch bugs)
- if !NETCORE // Do this for all but core, including desktop that trying to look like Core
- if !NETCORE || COREONDESK // Bypass for core tests on desktop (Compiling Core on Desktop), not problems here
- if !NETCORE || COREGAPFILL // Bypass for core tests on desktop (missing core functions), need to fix