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.
I'm having problems with docopt
In build.cmd I have:
dotnet fake run build.fsx -t "%*"
Calling it like:
.\build.cmd Test --tier=an-dev --clientId=guid --key=<secret> --subscriptionId=guid --output
In my build.fsx I have:
let cli = """
usage: prog [options]
options:
--tier=TIER environment to build against [default: an-dev]
--config=CONFIG dotnet Debug build configuration
--artifact-resource-group-name=NAME azure resource group to use for ARM deployment
--artifact-storage-account-name=NAME azure storage account to use for ARM templates
--clientId=ID azure jenkins service principal id
--key=KEY azure jenkins service principal secret
--subscriptionId=ID azure subscription id
--tenantId=ID azure AD tenant id
--no-sass-token don't use sass token for ARM deployment
--gen-reports generate coverage report
--output print ARM template output
"""
I can't get it to work with a target and use docopt