Skip to content
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

"error FS0193: internal error: Value cannot be null. Parameter name: con" #113

Closed
bentayloruk opened this issue Mar 10, 2013 · 6 comments
Closed

Comments

@bentayloruk
Copy link
Contributor

I wasn't sure whether to add this as a comment to #20. Figured new issue would be best.

I'm getting "error FS0193: internal error: Value cannot be null. Parameter name: con" when running the simple build script below. This script works with FAKE 1.64.7 but fails with the error on the latest -pre version FAKE.2.1.155-alpha.

Any suggestions you might have on how to resolve/diagnose this would be great. If you need more information, please tell me what you need. Thanks.

#I @".\src\packages\FAKE.2.1.155-alpha\tools"
#r @".\src\packages\FAKE.2.1.155-alpha\tools\FakeLib.dll"
open System
open Fake

let version = "0.1.0"
let buildOutputPath = @".\build\output"
let buildDirs = [ buildOutputPath; ]

let projFiles =
    !+ @".\src\**\*.csproj"
    -- @".\src\**\*Tests.csproj"
    |> Scan

Target "Clean" (fun _ -> CleanDirs buildDirs)

//Build
Target "BuildProjects" (fun _ ->
    MSBuild buildOutputPath "Build" ["Configuration", "Release"]  projFiles
    |> Log "BuildOutput:"
)


"Clean"
    ==> "BuildProjects" 

Run "BuildProjects" 
@colinbull
Copy link
Contributor

Is this running through FSI or the command line? i.e Fake.exe

@bentayloruk
Copy link
Contributor Author

I'm calling "fsi build.fsx" from a batch file that I invoke from the
command line.

@colinbull
Copy link
Contributor

Ahh.. Ok try running it using Fake.exe instead,

"src\packages\FAKE.2.1.155-alpha\tools\fake.exe" "build.fsx"
pause

I get an error using fsi.exe, albeit a different one. I'll continue to have a play and see if I can get the same error. Let me know whether the above works.

@bentayloruk
Copy link
Contributor Author

Thanks for your help with this Colin. That seems to work. Is using Fake.exe the recommended approach now? I don't think that existed when I wrote my build scripts. Can't see anything about it in the docs.

@bentayloruk
Copy link
Contributor Author

Odd. I have made this change on a slightly more complex version of build.fsx and the Nuget task (that works on 1.64.7) now complains that "The directory is invalid" for the nuget.exe path. Different problem, but seemingly a change between versions. I'm gonna get setup for some debugging here.

@colinbull
Copy link
Contributor

Yeah, I'm pretty sure Fake.exe is the recommended way of doing this as it sets up the environment a little better. As for the nuget stuff I'm not sure, but you might want to try things like removing trailing slashes from the tool path if you are not using the default ./tools/NuGet/NuGet.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants