$(PaketRootPath) is not set on a fresh dotnet restore
See original GitHub issueDescription
On a fresh restore of a Fable template, the paket restore fails due to an unset path variable.
I initially thought the problem was in (mono’s version of) MSBuild, since apparently $(PaketRootPath)
is set as $(MSBuildThisFileDirectory)
.
However, once I went and manually replaced $(PaketRootPath)
with $(MSBuildThisFileDirectory)
in Paket.Restore.Targets
the problem went away because $(MSBuildThisFileDirectory)
was set correctly, so I guess the issue may be on the Paket side?
Repro steps
On Ubuntu 17.04 with the dotnet 2.0 Preview 2 installed, run this:
dotnet new -i Fable.Template.Simple
dotnet new fable -n fsimple
dotnet restore
Expected behavior
The restore process starts (and then hangs due to an unrelated bug 😃 )
Actual behavior
The restore process exits immediately with:
Cannot open assembly '': No such file or directory.
/home/piaste/Projects/fsimple/.paket/Paket.Restore.targets(18,5): error MSB3073: The command "mono --runtime=v4.0.30319 "" restore --project "/home/piaste/Projects/fsimple/src/fsimple.fsproj" --target-framework netstandard1.6" exited with code 2. [/home/piaste/
Projects/fsimple/src/fsimple.fsproj]
The argument which comes up empty after --runtime
is $(PaketExePath)
, which is defined as follows:
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe')">$(PaketRootPath)paket.exe</PaketExePath>
Known workarounds
As mentioned above, manually replacing $(PaketRootPath)
with $(MSBuildThisFileDirectory)
in Paket.Restore.Targets
fixes the problem.
Environment
Paket version 5.6.11
dotnet --info
:
.NET Command Line Tools (2.0.0-preview2-006497)
Product Information: Version: 2.0.0-preview2-006497 Commit SHA-1 hash: 06a2093335
Runtime Environment: OS Name: ubuntu OS Version: 17.04 OS Platform: Linux RID: linux-x64 Base Path: /usr/share/dotnet/sdk/2.0.0-preview2-006497/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview2-25407-01 Build : 40c565230930ead58a50719c0ec799df77bddee9
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (7 by maintainers)
Top GitHub Comments
If you find some time… Would be nice 😉
Am 14.07.2017 19:05 schrieb “Maxime Mangel” notifications@github.com:
@forki https://github.com/forki I fixed the elmish templates. But perhaps not the fable.Simple
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/2519#issuecomment-315412575, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNNn40mELx5amNe5iyIlMYkM7JKu-ks5sN5_AgaJpZM4OYBza .
Change push in this PR: https://github.com/fable-compiler/Fable/pull/1069