Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Following official setup instructions. failure report on linux #1778
Tried following the instructions on how to install and use FAKE5 according to the infos on the web site.
Step 1: Setup a normal class library using dotnet CLI
Step 2: Install FAKE
According to the current documentation, we have 2 choices when working with linux:
Option 1: "Use it as dotnet tool" (with recommended example from Github)
This approach seems simple. We include the line
Just to be on the safe side, we create a new C# project:
Before (vanilla dotnet core generated csproj file):
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> </Project>
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <DotNetCliToolReference Include="dotnet-fake" Version="5.0.0*" /> </PropertyGroup> </Project>
Then we run
Ups. Let's try this
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <ItemGroup> <DotNetCliToolReference Include="dotnet-fake" Version="5.0.0*" /> </ItemGroup> </Project>
Ok, the error message says that there is a version
Let's try that.
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <ItemGroup> <DotNetCliToolReference Include="dotnet-fake" Version="5.0.0-beta013" /> </ItemGroup> </Project>
This looks good:
The next step, according to the manual is to run
Ah, so it seems we need a build script. Makes sense.
Let's create a build script:
Output with a lot of error messages
Not sure what we should do now.
Let's try the second approach.
Option 2: Bootstrap via shell script (with recommended script from Github)
We already have dotnet core installed (see version info below), so we modify the script
#!/bin/bash dotnet restore dotnet-fake.csproj dotnet fake $@
Then we run the command
The lengthy output is below.
The long output does not convey if everything worked.
Now what? Did we just build FAKE5? If so: where is it? How can we use it?
The example Github repo does not have any C# or F# code in it, so we assume it's only purpose is to build FAKE5. Or should we run this code within our actual project? The FAKE Homepage lists this example under
I have to dismiss this approach, because I don't understand what it does.
Output from running fake.sh
I wanted to give FAKE5 a try. I have no previous experience with FAKE. Expecting to tweek csproj/fsproj file and a couple of CLI instructions.
FAKE does not seem to work with linux when following the official instructions.
Yes you have run into basically the same problem twice. Everything you did is reasonably and honestly should have worked :).
First of all thanks for trying this out and even more for giving feedback!
First to your question:
No the fake-bootstrap shows how to have a global
I think you might have run into fsprojects/Paket#2375 and it wasn't fixed as I thought it was. Can you try
Thanks for the detailed report.
One step closer ;-)
This means I have a local version of FAKE5?
If so: thanks for the quick help!
How do I continue my journey learning FAKE5? Can I now just follow the official steps from the home page?
Yes the examples on the website "should" work once the
Also you obviously might still encounter other bugs :)
added a commit
Feb 25, 2018
Ok please try again with beta020 and if I have not broken something else this particular thing should be done ...
@draptik Yes every kind of feedback/help is welcome - especially the kind of issues people experience the first time.
I think what's open here is the documentation bug regarding
Mmh, I still get an error message (for details see below):
Note: Just ignore the
The last line indicates that the search path might be wrong?
// This file is automatically generated by FAKE // This file is needed for IDE support only #if !FAKE #r "/home/patrick/.nuget/packages/fake.core.context/5.0.0-beta020/lib/net46/Fake.Core.Context.dll" #r "/home/patrick/.nuget/packages/fake.core.string/5.0.0-beta020/lib/net46/Fake.Core.String.dll" #r "/home/patrick/.nuget/packages/system.net.http/4.3.3/lib/net46/System.Net.Http.dll" #r "/home/patrick/.nuget/packages/system.security.cryptography.x509certificates/4.3.2/lib/net461/System.Security.Cryptography.X509Certificates.dll" #r "/home/patrick/.nuget/packages/system.security.cryptography.cng/4.4.0/lib/net47/System.Security.Cryptography.Cng.dll" #r "/home/patrick/.nuget/packages/system.security.cryptography.csp/4.3.0/lib/net46/System.Security.Cryptography.Csp.dll" #r "/home/patrick/.nuget/packages/system.security.cryptography.openssl/4.4.0/lib/netstandard2.0/System.Security.Cryptography.OpenSsl.dll" #r "/home/patrick/.nuget/packages/system.io.compression.zipfile/4.3.0/lib/net46/System.IO.Compression.ZipFile.dll" #r "/home/patrick/.nuget/packages/system.security.cryptography.algorithms/4.3.1/lib/net463/System.Security.Cryptography.Algorithms.dll" #r "/home/patrick/.nuget/packages/system.io.compression/4.3.0/lib/net46/System.IO.Compression.dll" #r "/home/patrick/.nuget/packages/system.linq.expressions/4.3.0/lib/net463/System.Linq.Expressions.dll" #r "/home/patrick/.nuget/packages/system.security.cryptography.encoding/4.3.0/lib/net46/System.Security.Cryptography.Encoding.dll" #r "/home/patrick/.nuget/packages/system.xml.readerwriter/4.3.1/lib/net46/System.Xml.ReaderWriter.dll" #r "/home/patrick/.nuget/packages/system.buffers/4.4.0/lib/netstandard2.0/System.Buffers.dll" #r "/home/patrick/.nuget/packages/system.globalization.extensions/4.3.0/lib/net46/System.Globalization.Extensions.dll" #r "/home/patrick/.nuget/packages/system.linq/4.3.0/lib/net463/System.Linq.dll" #r "/home/patrick/.nuget/packages/system.reflection.typeextensions/4.4.0/lib/net461/System.Reflection.TypeExtensions.dll" #r "/home/patrick/.nuget/packages/system.runtime.interopservices.runtimeinformation/4.3.0/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll" #r "/home/patrick/.nuget/packages/system.security.cryptography.primitives/4.3.0/lib/net46/System.Security.Cryptography.Primitives.dll" #r "/home/patrick/.nuget/packages/system.text.regularexpressions/4.3.0/lib/net463/System.Text.RegularExpressions.dll" #r "/home/patrick/.nuget/packages/system.diagnostics.diagnosticsource/4.4.1/lib/net46/System.Diagnostics.DiagnosticSource.dll" #r "/home/patrick/.nuget/packages/system.runtime.interopservices/4.3.0/lib/net463/System.Runtime.InteropServices.dll" #r "/home/patrick/.nuget/packages/system.console/4.3.0/lib/net46/System.Console.dll" #r "/home/patrick/.nuget/packages/system.io.filesystem/4.3.0/lib/net46/System.IO.FileSystem.dll" #r "/home/patrick/.nuget/packages/system.net.sockets/4.3.0/lib/net46/System.Net.Sockets.dll" #r "/home/patrick/.nuget/packages/system.reflection/4.3.0/lib/net462/System.Reflection.dll" #r "/home/patrick/.nuget/packages/system.globalization.calendars/4.3.0/lib/net46/System.Globalization.Calendars.dll" #r "/home/patrick/.nuget/packages/system.io/4.3.0/lib/net462/System.IO.dll" #r "/home/patrick/.nuget/packages/system.threading.tasks.extensions/4.4.0/lib/netstandard2.0/System.Threading.Tasks.Extensions.dll" #r "/home/patrick/.nuget/packages/system.threading.threadpool/4.3.0/lib/net46/System.Threading.ThreadPool.dll" #r "/home/patrick/.nuget/packages/microsoft.win32.primitives/4.3.0/lib/net46/Microsoft.Win32.Primitives.dll" #r "/home/patrick/.nuget/packages/system.appcontext/4.3.0/lib/net463/System.AppContext.dll" #r "/home/patrick/.nuget/packages/system.diagnostics.tracing/4.3.0/lib/net462/System.Diagnostics.Tracing.dll" #r "/home/patrick/.nuget/packages/system.io.filesystem.primitives/4.3.0/lib/net46/System.IO.FileSystem.Primitives.dll" #r "/home/patrick/.nuget/packages/system.runtime.extensions/4.3.0/lib/net462/System.Runtime.Extensions.dll" #r "/home/patrick/.nuget/packages/system.threading.thread/4.3.0/lib/net46/System.Threading.Thread.dll" #r "/home/patrick/.nuget/packages/system.runtime/4.3.0/lib/net462/System.Runtime.dll" #r "/home/patrick/.nuget/packages/fake.core.environment/5.0.0-beta020/lib/net46/Fake.Core.Environment.dll" #r "/home/patrick/.nuget/packages/fake.core.buildserver/5.0.0-beta020/lib/net46/Fake.Core.BuildServer.dll" #r "/home/patrick/.nuget/packages/fake.core.trace/5.0.0-beta020/lib/net46/Fake.Core.Trace.dll" #r "/home/patrick/.nuget/packages/fake.core.target/5.0.0-beta020/lib/net46/Fake.Core.Target.dll" #r "System" #r "System.ComponentModel.Composition" #r "System.Core" #r "System.Numerics" #r "System.Xml" #r "System.IO.Compression" #r "System.Xml.Linq" #r "System.IO.Compression.FileSystem" #r "System.Net.Http" #endif
Anything else I could try?
Current setup bash script (for further reference): https://gist.github.com/draptik/c0b270f1ed6ac59f091c1daee2c7aaa2
Does this help?
Any further steps I can help with?
I think the issue is that we need to write:
note that the name of the script is in the path. This is not very user friendly but I don’t know how we can improve that (due to technical restrictions). We could try to detect this error and give a improved error message maybe? Let me think about this a bit or maybe somebody else has a suggestion?