Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProjectScaffold is broken #347

Open
halcwb opened this issue May 16, 2019 · 0 comments
Open

ProjectScaffold is broken #347

halcwb opened this issue May 16, 2019 · 0 comments

Comments

@halcwb
Copy link
Contributor

halcwb commented May 16, 2019

Description

When trying to use ProjectScaffold as it is intended, an out of the box solution to quickly get you up and running with F#, the experience is very frustrating.

Repro steps

Please provide the steps required to reproduce the problem

  1. Download ProjectScaffold

  2. Make a new project directory

  3. Copy the content of ProjectScaffold in the project directory

  4. Remove the .git folder and the paket.lock file. The last one is necessary otherwise the build fails immediately, see issue: Initial build.sh fails on OSX #346.

  5. Run .paket/paket.exe install

  6. Run ./build.sh

  7. Enter all the requested details

Expected behavior

The project builds.

Actual behavior

The build fails with:

C:\Development\lab\test-scaffold\init.fsx (121,18)-(121,50): Warning FS0052: The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed
C:\Development\lab\test-scaffold\init.fsx (123,22)-(123,54): Warning FS0052: The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed
C:\Development\lab\test-scaffold\init.fsx (264,56)-(264,94): Warning FS0052: The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed
Warning: Paket resolved a FSharp.Core with version '4.6.0.0', but fake runs with a version of '4.5.0.0'. This is not supported.
Please either lock the version via 'nuget FSharp.Core ' or upgrade fake.
Read fsprojects/FAKE#2001 for details.
Hint: Could not find a version in your paket.dependencies file, consider adding 'version 5.193.0' at the top of your dependencies file (C:\Development\lab\test-scaffold\paket.dependencies).
Read fsprojects/FAKE#2193 for details.
Performance:

  • Cli parsing: 476 milliseconds
  • Packages: 59 milliseconds
    • Disk IO: 52 milliseconds
    • Creating Runtime Graph: 258 milliseconds
    • Retrieve Assembly List: 1 second
  • Script compiling: 9 seconds
  • Script analyzing: 473 milliseconds
  • Script running: 22 seconds
  • Script cleanup: 2 milliseconds
  • Runtime: 35 seconds
    The last restore is still up to date. Nothing left to do.
    run All
    Building project with version: LocalBuild
    Shortened DependencyGraph for Target All:
    <== All
    <== NuGet
    <== GenerateDocs
    <== RunTests
    <== CopyBinaries
    <== Build
    <== Restore
    <== AssemblyInfo
    <== Clean
    <== ReferenceDocs
    <== Docs
    <== CleanDocs

The running order is:
Group - 1

  • Clean
    Group - 2
  • AssemblyInfo
    Group - 3
  • Restore
    Group - 4
  • Build
    Group - 5
  • CopyBinaries
    Group - 6
  • RunTests
    Group - 7
  • CleanDocs
    Group - 8
  • Docs
    Group - 9
  • ReferenceDocs
    Group - 10
  • GenerateDocs
    Group - 11
  • NuGet
    Group - 12
  • All
    Starting target 'Clean'
    Finished (Success) 'Clean' in 00:00:00.0192482
    Starting target 'AssemblyInfo'
    Finished (Success) 'AssemblyInfo' in 00:00:00.0733479
    Starting target 'Restore'
    Starting task 'DotNet:restore': TestScaffold.sln
    C:\Development\lab\test-scaffold> "C:\Program Files\dotnet\dotnet.EXE" msbuild /version /nologo (In: false, Out: true, Err: true)
    15.9.20.62856
    C:\Development\lab\test-scaffold> "C:\Program Files\dotnet\dotnet.EXE" restore TestScaffold.sln /nodeReuse:False "/bl:C:\Users\halcw\AppData\Local\Temp\tmpBEAA.tmp.binlog" (In: false, Out: false, Err: false)
    C:\Program Files\dotnet\sdk\2.2.103\MSBuild.dll -nologo -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\2.2.103\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,C:\Program Files\dotnet\sdk\2.2.103\dotnet.dll -maxcpucount -target:Restore -verbosity:m /bl:C:\Users\halcw\AppData\Local\Temp\tmpBEAA.tmp.binlog /nodeReuse:False TestScaffold.sln
    Paket version 5.207.0
    Paket version 5.207.0
    The last restore is still up to date. Nothing left to do.
    The last restore is still up to date. Nothing left to do.
    Performance:
  • Runtime: 179 milliseconds
    Performance:
  • Runtime: 187 milliseconds
    Paket version 5.207.0
    Paket version 5.207.0
    Starting restore process.
    C:\Development\lab\test-scaffold\paket-files\paket.locked is locked by paket.exe (PID = 23576). Waiting...
    Performance:
  • Disk IO: 18 milliseconds
  • Runtime: 2 seconds
    Starting restore process.
    Performance:
  • Disk IO: 22 milliseconds
  • Runtime: 2 seconds
    Paket version 5.207.0
    The last restore is still up to date. Nothing left to do.
    Performance:
  • Runtime: 183 milliseconds
    Paket version 5.207.0
    Starting restore process.
    Performance:
  • Disk IO: 25 milliseconds
  • Runtime: 2 seconds
    Restoring packages for C:\Development\lab\test-scaffold\tests\TestScaffold.Tests\TestScaffold.Tests.fsproj...
    Restoring packages for C:\Development\lab\test-scaffold\src\TestScaffold\TestScaffold.fsproj...
    Restoring packages for C:\Development\lab\test-scaffold\src\TestScaffoldConsole\TestScaffoldConsole.fsproj...
    Generating MSBuild file C:\Development\lab\test-scaffold\src\TestScaffold\obj\TestScaffold.fsproj.nuget.g.props.
    Generating MSBuild file C:\Development\lab\test-scaffold\src\TestScaffold\obj\TestScaffold.fsproj.nuget.g.targets.
    Generating MSBuild file C:\Development\lab\test-scaffold\src\TestScaffoldConsole\obj\TestScaffoldConsole.fsproj.nuget.g.props.
    Generating MSBuild file C:\Development\lab\test-scaffold\src\TestScaffoldConsole\obj\TestScaffoldConsole.fsproj.nuget.g.targets.
    Restore completed in 424.83 ms for C:\Development\lab\test-scaffold\src\TestScaffold\TestScaffold.fsproj.
    Restore completed in 469.65 ms for C:\Development\lab\test-scaffold\src\TestScaffoldConsole\TestScaffoldConsole.fsproj.
    Generating MSBuild file C:\Development\lab\test-scaffold\tests\TestScaffold.Tests\obj\TestScaffold.Tests.fsproj.nuget.g.props.
    Generating MSBuild file C:\Development\lab\test-scaffold\tests\TestScaffold.Tests\obj\TestScaffold.Tests.fsproj.nuget.g.targets.
    Restore completed in 986.74 ms for C:\Development\lab\test-scaffold\tests\TestScaffold.Tests\TestScaffold.Tests.fsproj.
    Finished (Success) 'DotNet:restore' in 00:00:13.9479614
    Finished (Success) 'Restore' in 00:00:13.9513245
    Starting target 'Build'
    Starting task 'MSBuild': TestScaffold.sln

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" /version /nologo (In: false, Out: true, Err: true)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe TestScaffold.sln /t:Build /m /nodeReuse:False /v:q /p:RestorePackages=False /p:Optimize=True /p:DebugSymbols=True /p:Configuration=Release "/bl:C:\Users\halcw\AppData\Local\Temp\tmpF4CE.tmp.binlog"
C:\Development\lab\test-scaffold> "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" TestScaffold.sln /t:Build /m /nodeReuse:False /v:q /p:RestorePackages=False /p:Optimize=True /p:DebugSymbols=True /p:Configuration=Release "/bl:C:\Users\halcw\AppData\Local\Temp\tmpF4CE.tmp.binlog" (In: false, Out: false, Err: false)
Microsoft (R) Build Engine version 16.0.462+g62fb89029d for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe /bl:C:\Users\halcw\AppData\Local\Temp\tmpF4CE.tmp.binlog /m /nodeReuse:False /p:RestorePackages=False /p:Optimize=True /p:DebugSymbols=True /p:Configuration=Release /t:Build /v:q TestScaffold.sln
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1183,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [C:\Development\lab\test-scaffold\tests\TestScaffold.Tests\TestScaffold.Tests.fsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1183,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [C:\Development\lab\test-scaffold\src\TestScaffoldConsole\TestScaffoldConsole.fsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1183,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [C:\Development\lab\test-scaffold\src\TestScaffold\TestScaffold.fsproj]
GetReferenceAssemblyPaths: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1183,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
Finished (Failed) 'MSBuild' in 00:00:12.9920932
Finished (Failed) 'Build' in 00:00:12.9954472


Build Time Report

Target Duration


Clean 00:00:00.0074665
AssemblyInfo 00:00:00.0732271
Restore 00:00:13.9511777
Build 00:00:12.9952084 (Exception of type 'Fake.DotNet.MSBuildException' was thrown.)
CopyBinaries 00:00:00 (skipped)
RunTests 00:00:00 (skipped)
CleanDocs 00:00:00 (skipped)
Docs 00:00:00 (skipped)
ReferenceDocs 00:00:00 (skipped)
GenerateDocs 00:00:00 (skipped)
NuGet 00:00:00 (skipped)
All 00:00:00 (skipped)
Total: 00:00:27.2297225
Status: Failure

Script reported an error:
-> BuildFailedException: Target 'Build' failed.
-> One or more errors occurred. (Exception of type 'Fake.DotNet.MSBuildException' was thrown.)
-> MSBuildException: Exception of type 'Fake.DotNet.MSBuildException' was thrown.
Hint: To further diagnose the problem you can run fake in verbose mode fake -v run ... or set the 'FAKE_DETAILED_ERRORS' environment variable to 'true'
Warning: Paket resolved a FSharp.Core with version '4.6.0.0', but fake runs with a version of '4.5.0.0'. This is not supported.
Please either lock the version via 'nuget FSharp.Core ' or upgrade fake.
Read fsprojects/FAKE#2001 for details.
Hint: Could not find a version in your paket.dependencies file, consider adding 'version 5.193.0' at the top of your dependencies file (C:\Development\lab\test-scaffold\paket.dependencies).
Read fsprojects/FAKE#2193 for details.
Performance:

  • Cli parsing: 494 milliseconds
  • Packages: 68 milliseconds
    • Disk IO: 49 milliseconds
    • Creating Runtime Graph: 245 milliseconds
    • Retrieve Assembly List: 1 second
  • Script compiling: 9 seconds
  • Script analyzing: 476 milliseconds
  • Script running: 27 seconds
  • Script cleanup: 31 milliseconds
  • Runtime: 40 seconds

Known workarounds

Spent several hours to solve this, setting to a specific framework, pinning the FSharp.Core version, etc.. No result.

Related information

.NET Core SDK (reflecting any global.json):
Version: 2.2.103
Commit: 8edbc2570a

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

Host (useful for support):
Version: 2.2.1
Commit: 878dd11e62

.NET Core SDKs installed:
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.302 [C:\Program Files\dotnet\sdk]
2.1.401 [C:\Program Files\dotnet\sdk]
2.1.500 [C:\Program Files\dotnet\sdk]
2.1.505 [C:\Program Files\dotnet\sdk]
2.1.602 [C:\Program Files\dotnet\sdk]
2.1.604 [C:\Program Files\dotnet\sdk]
2.2.103 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant