-
Notifications
You must be signed in to change notification settings - Fork 588
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
There was a problem while setting up the environment #2648
Comments
Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project! |
can you please send the output of |
fake version:
dotnet info:
dotnet fake build
|
I don't know anything about F# ecosystem, how should I build the 5.21.1 release? |
@mattiasdrp you can update your version with |
Thanks ;-) Clean
Build
Info:
|
@mattiasdrp can you please check your environment variables? Specifically The default locations for linux is And in the resolution algorithm, we look for environment variables before default installation. So maybe you have an entry in one of these environment variables that got resolved by algorithm. |
Sure!
My issue is that my dotnet version is 6.0.101 so there is no |
Can you please check if you have this path in your file system? |
I have dotnet in usr/bin:
I don't have |
@mattiasdrp You have a symlink from cc: @baronfel |
Correct, if |
Hi, thanks for your answer ;-) Build failing again. Once again it tries to find /usr/share/dotnet/packs/Microsoft.NETCore.App.Ref/6.0.0/ref/net6.0 when it should find /usr/share/dotnet/packs/Microsoft.NETCore.App.Ref/6.0.1/ref/net6.0 (6.0.0 instead of 6.0.1).
Dotnet info:
Path:
|
I'm having some problems after trying to update FAKE while setting the environment up too ❯ dotnet fake -v run build.fsx
runOrBuild ({ Script = Some "build.fsx"
ScriptArguments = []
FsiArgLine = []
Debug = false
NoCache = false
RestoreOnlyGroup = false
VerboseLevel = Verbose
IsBuild = false })
FAKE 5 - F# Make (5.21.1) (this line is written to standard error, see https://github.com/fsharp/FAKE/issues/2066)
prepareAndRunScriptRedirect(Script: build.fsx, fsiOptions: "")
Writing 'C:\d\Astrorex.Api\.fake\build.fsx\intellisense.fsx'
Restoring with paket...
The last restore is still up to date. Nothing left to do.
Retrieving the assemblies (rid: 'win10-x64')...
Performance:
- Cli parsing: 243 milliseconds
- Packages: 298 milliseconds
- Retrieve Assembly List: 10 milliseconds
- Runtime: 798 milliseconds
There was a problem while setting up the environment, see standard error for details.
There was a problem while setting up the environment:
-> FormatException: Invalid version: 6.0
StackTrace:
at Microsoft.Deployment.DotNet.Releases.ReleaseVersion..ctor(String version)
at Fake.Runtime.SdkAssemblyResolver.SdkAssemblyResolver.IsSdkVersionFromGlobalJsonSameAsSdkVersion() in D:\a\FAKE\FAKE\src\app\Fake.Runtime\SdkAssemblyResolver.fs:line 50
at Fake.Runtime.SdkAssemblyResolver.SdkAssemblyResolver.ResolveSdkReferenceAssemblies(GroupName groupName, Lazy`1 paketDependenciesFile) in D:\a\FAKE\FAKE\src\app\Fake.Runtime\SdkAssemblyResolver.fs:line 319
at Fake.Runtime.FakeRuntime.retrieveInfosUncached@114(String cacheDir, Lazy`1 paketDependenciesFile, VerboseLevel logLevel, GroupName groupName, SdkAssemblyResolver sdkAssemblyResolver, FrameworkIdentifier framework, Rid rid, Rid ridNotVersionSpecific, Lazy`1 lockFile, Lazy`1 cache, Unit unitVar0) in D:\a\FAKE\FAKE\src\app\Fake.Runtime\FakeRuntime.fs:line 202
at [email protected](Unit unitVar0) in D:\a\FAKE\FAKE\src\app\Fake.Runtime\FakeRuntime.fs:line 312
at Fake.Runtime.CoreCache.getCached[a](FSharpFunc`2 getUncached, FSharpFunc`2 readFromCache, FSharpFunc`2 writeToCache, FSharpFunc`2 checkCacheUpToDate) in D:\a\FAKE\FAKE\src\app\Fake.Runtime\CoreCache.fs:line 41
at Fake.Runtime.FakeRuntime.getKnownDependencies@310(String cacheDir, Lazy`1 paketDependenciesFile, VerboseLevel logLevel, GroupName groupName, FileInfo lockFilePath, String dependencyCacheHashFile, String dependencyCacheFile, SdkAssemblyResolver sdkAssemblyResolver, FrameworkIdentifier framework, Rid rid, Rid ridNotVersionSpecific, Lazy`1 lockFile, Lazy`1 cache, Lazy`1 writeIntellisenseTask, FSharpFunc`2 readFromCache, FSharpFunc`2 writeToCache, Unit unitVar0) in D:\a\FAKE\FAKE\src\app\Fake.Runtime\FakeRuntime.fs:line 311
at [email protected](Unit unitVar) in D:\a\FAKE\FAKE\src\app\Fake.Runtime\FakeRuntime.fs:line 320
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at Fake.Runtime.FakeRuntime.paketCachingProvider(FakeConfig config, String cacheDir, Dependencies paketApi, Lazy`1 paketDependenciesFile, FSharpOption`1 group) in D:\a\FAKE\FAKE\src\app\Fake.Runtime\FakeRuntime.fs:line 323
at Fake.Runtime.FakeRuntime.runScript(PrepareInfo preparedScript) in D:\a\FAKE\FAKE\src\app\Fake.Runtime\FakeRuntime.fs:line 579
at Program.runOrBuild(RunArguments args) in D:\a\FAKE\FAKE\src\app\Fake.netcore\Program.fs:line 156
Hint: If you just upgraded the fake-runner you can try to remove the .fake directory and try again. More info:
|
Not sure if this is related but what helped in my case was setting the framework to
before it was |
Ran into this issue on Ubuntu 20.04 with dotnet SDK 6.0.200. How to reproduceFirst create a skeleton project. I've found it needs some actual source code to run into this issue, but that could be anecdotal since I tried many different things. mkdir fake-test
cd fake-test
dotnet new fake # Yes/Yes when prompted
dotnet tool install paket
mkdir proj
dotnet new console --language F# --output proj
dotnet fake build Everything up until this point works as expected. Here's where the fun begins. If the folder is copied (or cloned as a git repo), and built with a fresh terminal, this error pops up. Let's assume I copied # Fresh terminal
cd fake-test-2
rm -rf .fake
dotnet fake build Result:
WorkaroundThis seems to fix the issue in the local environment only: export DOTNET_HOST_PATH=/usr/share/dotnet/sdk Environment
|
Ran into this today on Ubuntu 20.04 with .NET SDK 6.0.201. Setting the Environmentdotnet info
path
|
I'm trying to build Fable on Debian with .NET 6.0.202 and encountered a similar problem.
It seems like there are two separate issues going on, but one seems to be already fixed in I think this issue may be safe to close? 1. FAKE tries to find the .NET SDK installation from
|
I'm also getting this, but only on Linux. On Windows it works. Removing |
If you're experiencing this issue on a Mac with a M1 processor (assuming you've installed the x64 version of the .NET SDK). You'll need to create an environment variable named |
Had the same problem. adding framework: net6.0 in the #r "paket: ..." and removing the global.json fixed it. |
I fix my issue with building FSharp.Data by removing global.json
dotnet --info
dotnet --list-sdks
ls "C:\Program Files\dotnet\sdk"
ls "%localappdata%\Microsoft\dotnet\sdk-manifests"
> ls "C:\Program Files (x86)\dotnet\packs\Microsoft.NETCore.App.Ref"
I did have following error
I suspect that 6.0.5 comes from required 6.0.203 SDK from global.json |
I guess my problem is the same as this one (I'm following the install instructions from here
I'm just starting with dotnet so I have no idea what I should do to be able to install it
My issue is that my dotnet version is 6.0.101 so the issue is that there is no
/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Ref/6.0.0/ref/net6.0. I
do have/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Ref/6.0.1/ref/net6.0/
but I don't know how to tell FAKE to look for it.I tried adding the proper path in
FAKE_SDK_RESOLVER_CUSTOM_DOTNET_PATH
(withFAKE_SDK_RESOLVER_CUSTOM_DOTNET_PATH="/usr/share/dotnet:$FAKE_SDK_RESOLVER_CUSTOM_DOTNET_PATH"
) and evenln -s /usr/share/dotnet /usr/local/share/dotnet
but it doesn't work.Originally posted by @mattiasdrp in #2638 (comment)
The text was updated successfully, but these errors were encountered: