On a separate but related topic, in my build.fsx
I've got
#r "paket:
storage: packages
nuget Fake.IO.FileSystem
nuget Fake.Core.Target
nuget Fake.DotNet.Cli
nuget Node.js.redist --version 12.16.3
nuget Fake.JavaScript.Yarn --version 5.20.1
//"
Even though I've deleted the .fake
folder and the build.fsx.lock
, the latest version of "Node.js.redist" is being downloaded. What is the correct way to pin the version?
fake
using dotnet tool install fake-cli --too-path
to install fake. I also have my nuget packages defined in build.fsx as above. Now let's say I add a new Nuget package, what is the prescribed way to get the new package because running fake run build
doesn't do it. I know that deleting build.fsx.lock and running the previous command will work but I was wondering if there is a better way
I have a library targeting appnetcore3.1 in a private nuget feed. Having trouble using it from fake.
the source line in paket.dependencies
looks like this:
// [ FAKE GROUP ]
group Build
storage none
source https://jfrog.private.com/artifactory/api/nuget/nuget-repo username: "%ARTIFACTORY_USER%" password: "%ARTIFACTORY_USER_PASS%"
nuget Fake.DotNet.Cli
nuget Fake.IO.FileSystem
nuget Fake.Core.Target
nuget MyLib // <- libray from private nuget source
I suspect the package handling in fake is outsorced to paket. It actually wors for me in another solution.
The problem with fake is - the resulting intellisense_lazy.fsx
file doesn't include my library and fake complains about unknown namespace in open statement in the build script. I have no clue why it should not work out of the box...
Is there any way how I can diagnose this?
Hello. Trying to run some xunit tests, but I get this error:
Script reported an error:
-> BuildFailedException: Target 'Test' failed.
-> One or more errors occurred. (trying to start a .NET process on a non-windows platform, but mono could not be found. Try to set the MONO environment variable or add mono to the PATH.)
-> trying to start a .NET process on a non-windows platform, but mono could not be found. Try to set the MONO environment variable or add mono to the PATH.
My target looks like:
open Fake.Core
open Fake.DotNet
open Fake.DotNet.Testing
open Fake.IO.Globbing.Operators
open Fake.IO.FileSystemOperators
open System.IO
Target.create "Test" (fun _ ->
Trace.log " --- Running tests --- "
!! (testDir @@ "**/Release/bin/*.Tests.dll")
|> XUnit2.run (fun p -> { p with HtmlOutputPath = Some (testDir @@ "xunit.html") })
)
Isn't that supposed to run on dotnet core?
Fake.DotNet.Testing.VSTest
Fake.DotNet.Testing.NUnit3
There was a problem while setting up the environment:
-> Error during parsing of '/home/bla/myrepo/paket.lock'.
-> failed to parse line ' System.Text.Json (>= 5.0) - restriction: || (>= net461) (&& (< net5.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1))' (invalid parameter 'net5.0' after >= or < in '< net5.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1))') (Could not parse 'framework: restriction: || (>= net461) (&& (< net5.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1))' as key/value pairs.)
- invalid parameter 'net5.0' after >= or < in '< net5.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1))'
- Could not parse 'framework: restriction: || (>= net461) (&& (< net5.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1))' as key/value pairs.
-> invalid delimiter at position 22
I upgraded my project to use net5.0. When I run dotnet fake --version:
FAKE 5 - F# Make (5.20.4-alpha.1642+vsts.cc9c2d6e6d38fde57081cbefcd940f247425f904)
Paket.Core: 5.251.0
When I run dotnet fake build:
\build.fsx (8,5)-(8,9): Error FS0039: The namespace or module 'Fake' is not defined."
Also more errors about 'Farmer' is not defined, 'Target' is not defined, 'Path' is not defined, etc...
I'm using the SAFE Stack Template from here:
https://github.com/SAFE-Stack/SAFE-template
Is it missing some kind of assembly reference I need for 5.0? I changed my paket.dependencies to have group Build use framework "net5.0", maybe that's a mistake?
Hi,
I'm trying to pass the version parameter to DotNet.publish, like
|> DotNet.publish (fun p ->
{ p with
OutputPath = Some publishPath
MSBuildParams = { p.MSBuildParams with
Properties = [ "/p:Version" version ]
}
Configuration = DotNet.BuildConfiguration.fromString "Release" })
but I get an error.