.NET Core 3.0 Preview 3 Released

Along with updates in Docker containers, Range, and Index, .NET Core 3.0.0 Preview 3 is now available for download and usage in your environment.

Microsoft has announced .NET Core 3.0 Preview 3. This release introduces improvements in .NET Core SDK installers, Docker containers, Range, and Index. There are some useful updates on the Windows Desktop and Entity Framework projects as well.
 
The company said that .NET Core 3.0 will be supported in Visual Studio 2019, Visual Studio for Mac and Visual Studio Code. A new C# extension update has been added with the latest C# compiler, aligned with .NET Core Preview 3 and Visual Studio 2019 Preview 4.
 
Microsoft also revealed that it plans to ship .NET Core 3.0 in the second half of 2019 and Visual Studio 2019 is scheduled to be released on April 2nd.
 
Notable Changes in 3.0.0 Preview 3 include:
  • ASP.NET Core 3.0 Preview 3 (bugs, features)
  • Entity Framework Core 3.0 Preview 3
  • .NET Core SDK installers will now Upgrade in Place
  • Container image availability in the Microsoft Container Registry (MCR)
  • Docker and cgroup memory Limits
  • Index and Range
  • F# 4.6
  • dotnet fsi preview
  • .NET Standard 2.1
  • Work continues on WinForms and WPF
  • Docker and cgroup memory Limits
For docker and cgroup memory limits, the design summary given below describes the new .NET Core behavior when cgroup limits are set:
  • Default GC heap size: maximum of 20mb or 75% of the memory limit on the container
  • Explicit size can be set as an absolute number or percentage of cgroup limit
  • Minimum reserved segment size per GC heap is 16mb, which will reduce the number of heaps created on machines with a large number of cores and small memory limits
The company said that its teams are now publishing container images to the MCR. One reason is Syndicate Microsoft which provided container images to multiple registries, like Docker Hub and Red Hat. And the second one is to use Microsoft Azure as a global CDN for delivering Microsoft-provided container images.
 
The company has added some more APIs to enable using Index and Range with some other types such as String, [Readonly]Span<T>, [Readonly]Memory<T> and Array.
  1. // start with int[]  
  2. int[] nums = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };  
  3. int lastNum = nums[^1]; // 10  
  4. int[] subsetNums = nums[2..6]; // {3, 4, 5, 6}  
  5.    
  6. // Create a Memory<int> using arrayofNums as input  
  7. // Create no-copy slices of the array  
  8. Memory<int> numbers = nums;  
  9. Memory<int> lastTwoNums = numbers.Slice(^2); // {9, 10}  
  10. Memory<int> middleNums = numbers.Slice(4..8); // {5, 6, 7, 8}  
  11.    
  12. // Create a substring using a range  
  13. string myString = "0123456789ABCDEF";  
  14. string substring = myString[0..5]; // "01234"  
  15.    
  16. // Create a Memory<char> using a range  
  17. ReadOnlyMemory<char> myChars = myString.AsMemory();  
  18. ReadOnlyMemory<char> firstChars = myChars[0..5]; // {'0', '1', '2', '3', '4'}  
  19.    
  20. // Get an offset with an Index  
  21. Index indexFromEnd = Index.FromEnd(3); // equivalent to [^3]  
  22. int offsetFromLength = indexFromEnd.GetOffset(10); // 7  
  23. int value = nums[offsetFromLength]; // 8  
  24.    
  25. // Get an offset with a Range  
  26. Range rangeFromEnd = 5..^0;  
  27. (int offset, int length) = rangeFromEnd.GetOffsetAndLength(10); // offset = 5, length = 5  
  28. Memory<int> values = numbers.Slice(offset, length); // {6, 7, 8, 9, 10}  
Source: Microsoft 
 
F# 4.6 (Preview) (in the SDK) and dotnet fsi (Preview) command has also been added in Preview 3.
 
To know more about the updates in .NET Core 3.0, you can visit the official announcement here or visit the release notes here.