fsprojects / FSharp.TypeProviders.SDK

The SDK for creating F# type providers
https://fsprojects.github.io/FSharp.TypeProviders.SDK/
MIT License
298 stars 94 forks source link

.NET 5 update? #356

Closed natalie-o-perret closed 2 years ago

natalie-o-perret commented 3 years ago

Description

Wondering if we should upgrade the Type Providers SDK to build with .NET 5 by default.

Repro steps

I followed the steps of the Getting Started:

❯ dotnet new -i FSharp.TypeProviders.Templates
  Determining projects to restore...
  Restored C:\Users\Michelle\.templateengine\dotnetcli\v5.0.101\scratch\restore.csproj (in 4.05 sec).
Templates                                         Short Name               Language          Tags
--------------------------------------------      -------------------      ------------      ----------------------
Console Application                               console                  [C#], F#, VB      Common/Console
Class library                                     classlib                 [C#], F#, VB      Common/Library
WPF Application                                   wpf                      [C#], VB          Common/WPF
WPF Class library                                 wpflib                   [C#], VB          Common/WPF
WPF Custom Control Library                        wpfcustomcontrollib      [C#], VB          Common/WPF
WPF User Control Library                          wpfusercontrollib        [C#], VB          Common/WPF
Windows Forms App                                 winforms                 [C#], VB          Common/WinForms
Windows Forms Control Library                     winformscontrollib       [C#], VB          Common/WinForms
Windows Forms Class Library                       winformslib              [C#], VB          Common/WinForms
Worker Service                                    worker                   [C#], F#          Common/Worker/Web
Unit Test Project                                 mstest                   [C#], F#, VB      Test/MSTest
NUnit 3 Test Project                              nunit                    [C#], F#, VB      Test/NUnit
NUnit 3 Test Item                                 nunit-test               [C#], F#, VB      Test/NUnit
xUnit Test Project                                xunit                    [C#], F#, VB      Test/xUnit
Basic F# Type Provider                            typeprovider             F#                TypeProviders
Razor Page                                        page                     [C#]              Web/ASP.NET
MVC ViewImports                                   viewimports              [C#]              Web/ASP.NET
Blazor Server App                                 blazorserver             [C#]              Web/Blazor
ASP.NET Core Empty                                web                      [C#], F#          Web/Empty
ASP.NET Core Web App (Model-View-Controller)      mvc                      [C#], F#          Web/MVC
ASP.NET Core Web App                              webapp                   [C#]              Web/MVC/Razor Pages
ASP.NET Core with Angular                         angular                  [C#]              Web/MVC/SPA
ASP.NET Core with React.js                        react                    [C#]              Web/MVC/SPA
ASP.NET Core with React.js and Redux              reactredux               [C#]              Web/MVC/SPA
Razor Class Library                               razorclasslib            [C#]              Web/Razor/Library
ASP.NET Core Web API                              webapi                   [C#], F#          Web/WebAPI
ASP.NET Core gRPC Service                         grpc                     [C#]              Web/gRPC
dotnet gitignore file                             gitignore                                  Config
global.json file                                  globaljson                                 Config
NuGet Config                                      nugetconfig                                Config
Dotnet local tool manifest file                   tool-manifest                              Config
Web Config                                        webconfig                                  Config
Solution File                                     sln                                        Solution
Protocol Buffer File                              proto                                      Web/gRPC
Examples:
    dotnet new mvc --auth Individual
    dotnet new --help
    dotnet new typeprovider --help
⚡ Michelle@Meow  ~\Desktop\Personal\Repos\tp-playground                                              [08:29]
❯ dotnet new typeprovider -n LemonadeProvider -lang F#
The template "Basic F# Type Provider" was created successfully.
⚡ Michelle@Meow  ~\Desktop\Personal\Repos\tp-playground                                              [08:29]
❯ cd LemonadeProvider
⚡ Michelle@Meow  ~\Desktop\Personal\Repos\tp-playground\LemonadeProvider                             [08:29]
❯ dotnet tool restore
Found .NET SDK, but did not find dotnet.dll at [C:\Program Files\dotnet\sdk\3.1.110\dotnet.dll]

First off, I was like... ok I thought I uninstalled everything except one

❯ dotnet --list-sdks
5.0.100 [C:\Program Files\dotnet\sdk]
5.0.101 [C:\Program Files\dotnet\sdk]

and then updated the global.json:

{
  "sdk": {
    "version": "3.1.100"
  }
}

to:

{
  "sdk": {
    "version": "5.0.101"
  }
}

I tried again:

⚡ Michelle@Meow  ~\Desktop\Personal\Repos\tp-playground\LemonadeProvider                             [08:35]
❯ dotnet build -c release
Microsoft (R) Build Engine version 16.8.0+126527ff1 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Paket version 5.241.5
  Paket version 5.241.5
  Paket version 5.241.5
  The last restore is still up to date. Nothing left to do.
  Performance:
   - Runtime: 225 milliseconds
  The last restore is still up to date. Nothing left to do.
  Performance:
   - Runtime: 208 milliseconds
  The last restore is still up to date. Nothing left to do.
  Performance:
   - Runtime: 198 milliseconds
  Paket version 5.241.5
  Paket version 5.241.5
  Paket version 5.241.5
  Starting restore process.
  C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\paket-files\paket.processlock is locked by paket.exe (PID = 13600). Waiting...
  C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\paket-files\paket.processlock is locked by paket.exe (PID = 13600). Waiting...
  Performance:
   - Disk IO: 7 milliseconds
   - Runtime: 1 second
  Starting restore process.
  Starting restore process.
  Performance:
   - Disk IO: 5 milliseconds
   - Runtime: 1 second
  Performance:
   - Disk IO: 5 milliseconds
   - Runtime: 1 second
  Restored C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.Runtime\LemonadeProvider.Runtime.fsproj (in 329 ms).
  Restored C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.DesignTime\LemonadeProvider.DesignTime.fsproj (in 329 ms).
  Restored C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fsproj (in 2.85 sec).
  All projects are up-to-date for restore.
  Determining projects to restore...
  All projects are up-to-date for restore.
C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\paket-files\fsprojects\FSharp.TypeProviders.SDK\src\ProvidedTypes.fs(2090,13): error FS0810: Property 'CultureName' cannot be set [C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.DesignTime\LemonadeProvider.DesignTime.fsproj]
C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\paket-files\fsprojects\FSharp.TypeProviders.SDK\src\ProvidedTypes.fs(3162,13): error FS0810: Property 'CultureName' cannot be set [C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.DesignTime\LemonadeProvider.DesignTime.fsproj]
  LemonadeProvider.DesignTime -> C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netstandard2.0\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netcoreapp3.1\LemonadeProvider.DesignTime.dll

Build FAILED.

C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\paket-files\fsprojects\FSharp.TypeProviders.SDK\src\ProvidedTypes.fs(2090,13): error FS0810: Property 'CultureName' cannot be set [C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.DesignTime\LemonadeProvider.DesignTime.fsproj]
C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\paket-files\fsprojects\FSharp.TypeProviders.SDK\src\ProvidedTypes.fs(3162,13): error FS0810: Property 'CultureName' cannot be set [C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.DesignTime\LemonadeProvider.DesignTime.fsproj]
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:00:23.78

Which is pretty much the issue pinned in this issue: https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues/353

I therefore removed the lines with:

asmName.CultureName <- System.Globalization.CultureInfo.InvariantCulture.Name 

and I tried again:

⚡ Michelle@Meow  ~\Desktop\Personal\Repos\tp-playground\LemonadeProvider                             [08:40]
❯ dotnet build -c release
Microsoft (R) Build Engine version 16.8.0+126527ff1 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  LemonadeProvider.DesignTime -> C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netstandard2.0\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\net45\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netcoreapp3.1\LemonadeProvider.DesignTime.dll
  Determining projects to restore...
  Determining projects to restore...
  All projects are up-to-date for restore.
  All projects are up-to-date for restore.
  LemonadeProvider.Runtime -> C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Release\net45\LemonadeProvider.Runtime.dll
  LemonadeProvider.Runtime -> C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Release\netstandard2.0\LemonadeProvider.Runtime.dll
  LemonadeProvider.Tests -> C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\net461\LemonadeProvider.Tests.dll
  LemonadeProvider.Tests -> C:\Users\Michelle\Desktop\Personal\Repos\tp-playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\netcoreapp3.1\LemonadeProvider.Tests.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.39

It works but it's bit of a tedious setup.

Related information

❯ Get-ComputerInfo
 ...
OsName                                                  : Microsoft Windows 10 Enterprise
OsType                                                  : WINNT
OsOperatingSystemSKU                                    : EnterpriseEdition
OsVersion                                               : 10.0.18363
OsCSDVersion                                            :
OsBuildNumber                                           : 18363
natalie-o-perret commented 2 years ago

An update, because I've bumped into another wall since then, last time I had some time on my hands, I didn't try to run the tests, here is the walkthrough, nothing groundbreaking, but I've found it really cumbersome that we have to do all those steps below to get something "up and compiling":

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground [02:16:48]
$ dotnet new -i FSharp.TypeProviders.Templates
The following template packages will be installed:
   FSharp.TypeProviders.Templates

FSharp.TypeProviders.Templates is already installed, version: 6.0.0, it will be replaced with version .
FSharp.TypeProviders.Templates::6.0.0 was successfully uninstalled.
Success: FSharp.TypeProviders.Templates::6.0.0 installed the following templates:
Template Name           Short Name    Language  Tags
----------------------  ------------  --------  -------------
Basic F# Type Provider  typeprovider  F#        TypeProviders

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground [02:16:55]
$ dotnet new typeprovider -n LemonadeProvider -lang F#
The template "Basic F# Type Provider" was created successfully.

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground [02:16:59]
$ cd LemonadeProvider

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground\LemonadeProvider [02:17:47] C:1 
$ dotnet --list-sdks
5.0.201 [C:\Program Files\dotnet\sdk]
6.0.100-preview.6.21355.2 [C:\Program Files\dotnet\sdk]

and then updated the global.json:

{
  "sdk": {
    "version": "3.1.100"
  }
}

to:

{
  "sdk": {
    "version": "5.0.201"
  }
}

and then keep following the steps given in https://github.com/fsprojects/FSharp.TypeProviders.SDK#getting-started

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground\LemonadeProvider [02:26:42] C:1
$ dotnet tool restore
Tool 'paket' (version '5.241.5') was restored. Available commands: paket

Restore was successful.

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground\LemonadeProvider [02:26:49]
$ dotnet paket update
Paket version 5.241.5
Downloading fsprojects/FSharp.TypeProviders.SDK:f4aca36af04aa84b16ec04df6f6bf55ac2f17a73 src/ProvidedTypes.fsi to C:\Users\maryp\Desktop\Playground\LemonadeProvider\paket-files\fsprojects\FSharp.TypeProviders.SDK\src\ProvidedTypes.fsi
Downloading fsprojects/FSharp.TypeProviders.SDK:f4aca36af04aa84b16ec04df6f6bf55ac2f17a73 src/ProvidedTypes.fs to C:\Users\maryp\Desktop\Playground\LemonadeProvider\paket-files\fsprojects\FSharp.TypeProviders.SDK\src\ProvidedTypes.fs
Resolving packages for group Main:
 - FSharp.Core is pinned to 4.3.4
 - NETStandard.Library.NETFramework 2.0.0-preview2-25405-01
Resolving packages for group Test:
 - NUnit 3.13.2
 - NUnit.Console 3.12.0
 - NUnit3TestAdapter 4.0.0
 - FSharp.Core 5.0.2
 - NUnit.ConsoleRunner 3.12.0
 - NUnit.Extension.NUnitV2Driver 3.8.0
 - NUnit.Extension.VSProjectLoader 3.8.0
 - NUnit.Extension.NUnitProjectLoader 3.7.0 
 - NUnit.Extension.NUnitV2ResultWriter 3.6.0
 - NETStandard.Library 2.0.3
 - NUnit.Extension.TeamCityEventListener 1.0.8
     NUnit.Extension.TeamCityEventListener 1.0.8 was unlisted
 - NUnit.Extension.TeamCityEventListener 1.0.7
 - Microsoft.NETCore.Platforms 5.0.2
Locked version resolution written to C:\Users\maryp\Desktop\Playground\LemonadeProvider\paket.lock
Installing into projects:
 - Creating model and downloading packages.
 - Installing for projects
   - src/LemonadeProvider.DesignTime/paket.references -> src/LemonadeProvider.DesignTime/LemonadeProvider.DesignTime.fsproj
Extracted Paket.Restore.targets to: C:\Users\maryp\Desktop\Playground\LemonadeProvider\.paket\Paket.Restore.targets (Can be disabled 
with PAKET_SKIP_RESTORE_TARGETS=true)
   - src/LemonadeProvider.Runtime/paket.references -> src/LemonadeProvider.Runtime/LemonadeProvider.Runtime.fsproj
   - tests/LemonadeProvider.Tests/paket.references -> tests/LemonadeProvider.Tests/LemonadeProvider.Tests.fsproj
Performance:
 - Resolver: 5 seconds (2 runs)
    - Runtime: 124 milliseconds
    - Blocked (retrieving package details): 1 second (15 times)
    - Blocked (retrieving package versions): 3 seconds (6 times)
    - Not Blocked (retrieving package versions): 8 times
 - Disk IO: 793 milliseconds
 - Average Download Time: 281 milliseconds
 - Number of downloads: 2
 - Average Request Time: 284 milliseconds
 - Number of Requests: 18
 - Runtime: 8 seconds

Then just like before, I'm deleting the lines with containing:

asmName.CultureName <- System.Globalization.CultureInfo.InvariantCulture.Name 

and then run:

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground\LemonadeProvider [02:30:38]
$ dotnet build -c release
Microsoft (R) Build Engine version 16.9.0+57a23d249 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netstandard2.0\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\net45\LemonadeProvider.DesignTime.dll
  Determining projects to restore...
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netcoreapp3.1\LemonadeProvider.DesignTime.dll
  Determining projects to restore...
  All projects are up-to-date for restore.
  All projects are up-to-date for restore.
  LemonadeProvider.Runtime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Release\net45\LemonadeProvider.Runtime.dll
  LemonadeProvider.Runtime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Release\netstandard2.0\LemonadeProvider.Runtime.dll
  LemonadeProvider.Tests -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\net461\LemonadeProvider.Tests.dll
  LemonadeProvider.Tests -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\netcoreapp3.1\LemonadeProvider.Tests.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:02.92

So far, so good, BUT:

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground\LemonadeProvider [02:30:43]
$ dotnet test -c release
  Determining projects to restore...
  All projects are up-to-date for restore.
  Determining projects to restore...
  Determining projects to restore...
  All projects are up-to-date for restore.
  All projects are up-to-date for restore.
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netcoreapp3.1\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netstandard2.0\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\net45\LemonadeProvider.DesignTime.dll
  LemonadeProvider.Runtime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Release\net45\LemonadeProvider.Runtime.dll
  LemonadeProvider.Runtime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Release\netstandard2.0\LemonadeProvider.Runtime.dll
  LemonadeProvider.Tests -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\netcoreapp3.1\LemonadeProvider.Tests.dll
  LemonadeProvider.Tests -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\net461\LemonadeProvider.Tests.dll
Test run for C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\netcoreapp3.1\LemonadeProvider.Tests.dll (.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 16.9.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Testhost process exited with error: It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.
  - The following frameworks were found:
      5.0.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      6.0.0-preview.6.21352.12 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=x64&rid=win10-x64   
. Please check the diagnostic logs for more information.

Test Run Aborted.
Test run for C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\net461\LemonadeProvider.Tests.dll (.NETFramework,Version=v4.6.1)
Microsoft (R) Test Execution Command Line Tool Version 16.9.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.

Passed!  - Failed:     0, Passed:     5, Skipped:     0, Total:     5, Duration: 121 ms - LemonadeProvider.Tests.dll (net461)

So, I'm like "fair enough", and decided to replace the netcoreapp3.1 with netcoreapp5.0 in paket.dependencies:

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground\LemonadeProvider [02:35:53] C:1
$ dotnet paket update
Paket version 5.241.5
Performance:
 - Runtime: 359 milliseconds
Paket failed with
-> Error in paket.dependencies line 4
     Could not parse framework 'netcoreapp5.0'. Try to update or install again or report a paket bug.

I then checked the latest Paket version here: https://github.com/fsprojects/Paket and modified the version accordingly in .config\dotnet-tools.json:

{
  "version": 1,
  "isRoot": true,
  "tools": {
    "paket": {
      "version": "6.0.13",
      "commands": [
        "paket"
      ]
    }
  }
}
# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground\LemonadeProvider [02:36:50] C:1 
$ dotnet paket update
Paket version 6.0.13
Resolving dependency graph...
 - FSharp.Core is pinned to 4.3.4
Resolving dependency graph for group Test...
     NUnit.Extension.TeamCityEventListener 1.0.8 was unlisted
Installing into projects:
Created dependency graph (14 packages in total)
Total time taken: 6 seconds

BUT:

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground\LemonadeProvider [02:37:37]
$ dotnet build -c release
Microsoft (R) Build Engine version 16.9.0+57a23d249 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Paket version 6.0.13
  Paket version 6.0.13
  Paket version 6.0.13
  The last restore is still up to date. Nothing left to do.
  The last restore is still up to date. Nothing left to do.
  Total time taken: 0 milliseconds
  Total time taken: 0 milliseconds
  The last restore is still up to date. Nothing left to do.
  Total time taken: 0 milliseconds
  Paket version 6.0.13
  Paket version 6.0.13
  Paket version 6.0.13
  Starting restore process.
  Total time taken: 4 milliseconds
  Starting restore process.
  Total time taken: 5 milliseconds
  Starting restore process.
  Total time taken: 5 milliseconds
  Restored C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\LemonadeProvider.Runtime.f 182 ms).
  Restored C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\LemonadeProvider.Designoj (in 182 ms).
  Restored C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fsp67 ms).
  Determining projects to restore...
  Determining projects to restore...
  All projects are up-to-date for restore.
  All projects are up-to-date for restore.
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\be\netcoreapp3.1\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\be\netstandard2.0\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\be\net45\LemonadeProvider.DesignTime.dll
  LemonadeProvider.Runtime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Reltandard2.0\LemonadeProvider.Runtime.dll
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(5,6): error
The namespace or module 'NUnit' is not defined. Maybe you want one of the following:   NuGet [C:\Users\maryp\Desktop\
nd\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(7,3): error
The type 'Test' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\Lemoder.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(9,5): error
The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tesdeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(11,3): erro The type 'Test' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\Lemider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(13,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(15,3): erro The type 'Test' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\Lemider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(18,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
  LemonadeProvider.Runtime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Rel5\LemonadeProvider.Runtime.dll
C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\LemonadeProvider.Runtime.fsproj(39,5) MSB3026: Could not copy "..\LemonadeProvider.DesignTime\bin\Release\netcoreapp3.1\LemonadeProvider.DesignTime.dll" tlease\net45\/../typeproviders/fsharp41/netcoreapp3.1\LemonadeProvider.DesignTime.dll". Beginning retry 1 in 1000ms. Ts cannot access the file 'C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Releaseiders\fsharp41\netcoreapp3.1\LemonadeProvider.DesignTime.dll' because it is being used by another process.
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(23,3): erro The type 'Test' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\Lemider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(26,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(27,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(29,3): erro The type 'Test' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\Lemider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(32,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(33,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(34,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(35,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
  LemonadeProvider.Tests -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Relea\LemonadeProvider.Tests.dll

Build FAILED.

C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\LemonadeProvider.Runtime.fsproj(39,5) MSB3026: Could not copy "..\LemonadeProvider.DesignTime\bin\Release\netcoreapp3.1\LemonadeProvider.DesignTime.dll" tlease\net45\/../typeproviders/fsharp41/netcoreapp3.1\LemonadeProvider.DesignTime.dll". Beginning retry 1 in 1000ms. Ts cannot access the file 'C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Releaseiders\fsharp41\netcoreapp3.1\LemonadeProvider.DesignTime.dll' because it is being used by another process. 
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(5,6): error
The namespace or module 'NUnit' is not defined. Maybe you want one of the following:   NuGet [C:\Users\maryp\Desktop\
nd\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(7,3): error
The type 'Test' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\Lemoder.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(9,5): error
The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tesdeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(11,3): erro The type 'Test' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\Lemider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(13,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(15,3): erro The type 'Test' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\Lemider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(18,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(23,3): erro The type 'Test' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\Lemider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(26,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(27,5): erro The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\teC:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(32,5): error FS0039: The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(33,5): error FS0039: The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(34,5): error FS0039: The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fsproj]
C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fs(35,5): error FS0039: The value, namespace, type or module 'Assert' is not defined. [C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fsproj]
    1 Warning(s)
    15 Error(s)

Time Elapsed 00:00:45.17

Alright, so let's fix \tests\LemonadeProvider.Tests\LemonadeProvider.Tests.fsproj, replacing netcoreapp3.1 with netcoreapp5.0 and rerun the build:

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground\LemonadeProvider [02:44:34]
$ dotnet build -c release
Microsoft (R) Build Engine version 16.9.0+57a23d249 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netstandard2.0\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\net45\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netcoreapp3.1\LemonadeProvider.DesignTime.dll
  Determining projects to restore...
  Determining projects to restore...
  All projects are up-to-date for restore.
  All projects are up-to-date for restore.
  LemonadeProvider.Runtime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Release\net45\LemonadeProvider.Runtime.dll
  LemonadeProvider.Tests -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\net461\LemonadeProvider.Tests.dll
  LemonadeProvider.Runtime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Release\netstandard2.0\LemonadeProvider.Runtime.dll
  LemonadeProvider.Tests -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\netcoreapp5.0\LemonadeProvider.Tests.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.56

and eventually the tests can finally run flawlessly:

# natalie.perret.1986 @ VP0003784 in ~\Desktop\Playground\LemonadeProvider [02:44:38]
$ dotnet test -c release
  Determining projects to restore...
  All projects are up-to-date for restore.
  Determining projects to restore...
  Determining projects to restore...
  All projects are up-to-date for restore.
  All projects are up-to-date for restore.
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netcoreapp3.1\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\netstandard2.0\LemonadeProvider.DesignTime.dll
  LemonadeProvider.DesignTime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.DesignTime\bin\Release\net45\LemonadeProvider.DesignTime.dll
  LemonadeProvider.Runtime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Release\net45\LemonadeProvider.Runtime.dll
  LemonadeProvider.Runtime -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\src\LemonadeProvider.Runtime\bin\Release\netstandard2.0\LemonadeProvider.Runtime.dll
  LemonadeProvider.Tests -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\netcoreapp5.0\LemonadeProvider.Tests.dll
  LemonadeProvider.Tests -> C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\net461\LemonadeProvider.Tests.dll
Test run for C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\netcoreapp5.0\LemonadeProvider.Tests.dll (.NETCoreApp,Version=v5.0)
Microsoft (R) Test Execution Command Line Tool Version 16.9.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.

Passed!  - Failed:     0, Passed:     5, Skipped:     0, Total:     5, Duration: 32 ms - LemonadeProvider.Tests.dll (net5.0)
Test run for C:\Users\maryp\Desktop\Playground\LemonadeProvider\tests\LemonadeProvider.Tests\bin\Release\net461\LemonadeProvider.Tests.dll (.NETFramework,Version=v4.6.1)
Microsoft (R) Test Execution Command Line Tool Version 16.9.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.

Passed!  - Failed:     0, Passed:     5, Skipped:     0, Total:     5, Duration: 110 ms - LemonadeProvider.Tests.dll (net461)

[EDIT 1] Note: might worth updating the sources to support this right off the bat, or perhaps, provide a script to ease things up for the time being.

[EDIT 2] Also change netcoreapp3.1 with netcoreapp5.0 in LemonadeProvider.DesignTime.fsproj and LemonadeProvider.Runtime.fsproj

[EDIT 3] Thanks to nffa for pointing out that netcoreapp5.0 isn't a proper TFM and wasn't actually correctly processed

Also change netcoreapp3.1 with netcoreapp5.0 in LemonadeProvider.DesignTime.fsproj and LemonadeProvider.Runtime.fsproj

=> netcoreapp5.0 => net5.0

dsyme commented 2 years ago

I've moved everything to .NET 5.0, thanks!