ionide / Fornax

Scriptable static site generator using type safe F# DSL to define page templates.
MIT License
244 stars 44 forks source link

Cannot build fornax repo for PR #105

Closed Freymaurer closed 2 years ago

Freymaurer commented 2 years ago

Describe the bug Hey i am currently working on a PR to fix #104 but i can't build fornax following the steps in the README.md:

To Reproduce

Build process

Error:

There was a problem while setting up the environment:
-> Could not find referenced assemblies in path: 'C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0', please check installed SDK and runtime versions

Expected behaviour Fornax builds.

Environment (please complete the following information):

dotnet --list-sdks

3.1.413 [C:\Program Files\dotnet\sdk]
5.0.406 [C:\Program Files\dotnet\sdk]
6.0.101 [C:\Program Files\dotnet\sdk]
6.0.201 [C:\Program Files\dotnet\sdk]

dotnet --info

.NET SDK (reflecting any global.json):
 Version:   6.0.101
 Commit:    ef49f6213a

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19043
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.101\

Host (useful for support):
  Version: 6.0.3
  Commit:  c24d9a9c91

.NET SDKs installed:
  3.1.413 [C:\Program Files\dotnet\sdk]
  5.0.406 [C:\Program Files\dotnet\sdk]
  6.0.101 [C:\Program Files\dotnet\sdk]
  6.0.201 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Seems to be an issue with the build.fsx, but i have no idea how to adress this.

Pretty sure i encountered it already in other projects which i then upgraded to use a build.fsproj to circumvent this.

@baronfel

baronfel commented 2 years ago

can you try updating the fake-cli dotnet tool from the current 5.21 alpha to 5.22.0 and see if that resolves the issue?

baronfel commented 2 years ago

Otherwise, FAKE isn't doing anything incredibly complex, so a simple dotnet build should work for you.

Freymaurer commented 2 years ago

Hey thanks for the fast reply! But I tried that already:

  1. I changed the version in dotnet-tools.json
  2. delete .fake folder
  3. dotnet tool restore
  4. retry dotnet fake build

Same error as before.

Freymaurer commented 2 years ago

Otherwise, FAKE isn't doing anything incredibly complex, so a simple dotnet build should work for you.

Ah, yeah i get what you mean. Skip FAKE and use the commands directly, yeah that actually works. Pretty dumb to not think of that myself 😞

rdipardo commented 2 years ago

Identical problem on Linux: https://github.com/ionide/Fornax/pull/103#issuecomment-1086283858

can you try updating the fake-cli dotnet tool from the current 5.21 alpha to 5.22.0 and see if that resolves the issue?

For reference, it does not. The targeting pack must be at the exact path, and be the exact version that fake-cli is looking for:

 'C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0', please check installed SDK and runtime versions