From a4e6e5477a2687392e18cb03827b1f02e3c19e5a Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Tue, 12 May 2020 11:22:33 +0300 Subject: [PATCH 1/5] Update to Avalonia 0.9.10 and changed to more agressive Ilc settings --- src/AvaloniaCoreRTDemo.csproj | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/AvaloniaCoreRTDemo.csproj b/src/AvaloniaCoreRTDemo.csproj index 14802fc..64c2bba 100644 --- a/src/AvaloniaCoreRTDemo.csproj +++ b/src/AvaloniaCoreRTDemo.csproj @@ -3,21 +3,19 @@ WinExe net5.0 - - AnyCPU;x64 - - false - false - true - false + + false + false + false + true - + @@ -34,15 +32,15 @@ - - - + + + - + - + From a4b554853c8a05a7ea0b01fb10cb6ed79417b453 Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Tue, 12 May 2020 11:41:40 +0300 Subject: [PATCH 2/5] Cosmetic: Removed extra lines --- src/rd.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/rd.xml b/src/rd.xml index e6fc1fe..fa7ccfe 100644 --- a/src/rd.xml +++ b/src/rd.xml @@ -18,27 +18,21 @@ - - - - - --> - From 577f047c78631f0dd9d89188a0601edd6b1b2c4e Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Tue, 12 May 2020 11:48:16 +0300 Subject: [PATCH 3/5] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8cf5ce0..a770ef8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -This project shows how to integrate [Avalonia UI](https://avaloniaui.net) and [CoreRT](https://github.com/dotnet/corert). Both frameworks are incredible from a technical standpoint. However, they are under constant, heavy development, are not well documented, and require subtle knowledge spread across multiple sources. -Using this project, you will learn how to develop using both frameworks. You may also use it as a skeleton for your projects. +This project shows how to integrate [Avalonia UI](https://avaloniaui.net) and [CoreRT](https://github.com/dotnet/corert). Both frameworks are under heavy development, have sparce documentation, and require subtle knowledge spread across multiple sources. +Using this project, you will learn how to develop using both frameworks. You may also use it as a starting point for your projects. ## System requirements -This project was tested only under Windows, and this readme assumes you are using Windows. To build this project, you need: +This project is tested only under Windows, and this readme assumes you are using Windows. To build this project, you need: -* Any supported 64-bit edition of Windows. CoreRT produces only 64-bit Windows apps. +* Any supported 64-bit edition of Windows. CoreRT requires 64-bit Windows and produces only 64-bit Windows apps. * Visual Studio. VS 20019 Community is free for personal use. Get if from [here](https://visualstudio.microsoft.com). When installing Visual Studio, select *.NET desktop development* and *Desktop development with C++* workloads. To generate native code, CoreRT requires the native C++ toolchain and Windows SDK. This configuration ensures you have them. * .Net Core SDK. At the time of writing, .Net Core 5.0 is in a preview state. Download it from [here](https://dotnet.microsoft.com/download/dotnet/5.0). Note: Make sure that you download and install the *SDK*. The runtime is not enough for building apps. @@ -26,13 +26,13 @@ Then, build the sample: ```bash dotnet publish -r win-x64 -c release ``` -**Note**: Avalonia and CoreRT are huge. Downloading them might take some time. During this period, which happens on the first build, and when CoreRT releases a new version, it will look like nothing happens. Just be patient. +**Note**: Avalonia and CoreRT are huge and downloading their NuGet packages may take some time. During this period, which happens on the first build, and when CoreRT releases a new version, it will look like nothing happens. Just be patient. We are ready - In your terminal, navigate to `src\bin\Release\net5.0\win-x64\publish`, and start AvaloniaCoreRTDemo.exe - it should work! ### Background information -At the time of writing, there's an incompatibility between the current version of Avalonia (0.9.9) and CoreRT, which we need to solve. To give you context, CoreRT is an ahead-of-time compiler, and specific code patterns cannot be used with it, while JIT compilers handle them easily. One such pattern is the infinite generic type expansions, and one of Avalonia dependencies [uses it](https://github.com/dotnet/corert/issues/7920#issuecomment-568536702). The library which uses this code has released a fixed version. However, Avalonia has not been updated yet. To solve this problem, we force the new version of the sub-dependency in the project file: +At the time of writing, there's an incompatibility between the current version of Avalonia (0.9.10) and CoreRT, which we need to solve. To give you context, CoreRT is an ahead-of-time compiler, and specific code patterns cannot be used with it, while JIT compilers handle them easily. One such pattern is the infinite generic type expansions, and one of Avalonia dependencies [uses it](https://github.com/dotnet/corert/issues/7920#issuecomment-568536702). The library which uses this code has released a fixed version. However, Avalonia has not been updated yet. To solve this problem, we force the new version of the sub-dependency in the project file: ```XML From 96fa48e261f7482871ef49ed61e6926b786f3748 Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Fri, 22 May 2020 11:02:38 +0300 Subject: [PATCH 4/5] Add new NuGet Source Microsoft recently changed the way they distribute Net5 preview builds. Adding the new NuGet source to enable building against .NET 5.0 preview5+ and their nightly builds. --- src/nuget.config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nuget.config b/src/nuget.config index da828f0..01e64e5 100644 --- a/src/nuget.config +++ b/src/nuget.config @@ -2,7 +2,8 @@ + - \ No newline at end of file + From 63280b19925318cf6aac6de967a0956cc6b93d0c Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Sat, 23 May 2020 00:21:46 +0300 Subject: [PATCH 5/5] Removed unneeded setting --- src/AvaloniaCoreRTDemo.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/AvaloniaCoreRTDemo.csproj b/src/AvaloniaCoreRTDemo.csproj index 14802fc..9c17ef4 100644 --- a/src/AvaloniaCoreRTDemo.csproj +++ b/src/AvaloniaCoreRTDemo.csproj @@ -3,8 +3,6 @@ WinExe net5.0 - - AnyCPU;x64