-
Notifications
You must be signed in to change notification settings - Fork 587
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 when invoking fake run with different casings #2314
Comments
Very nice find, thanks for reporting and the steps |
This are actually two bugs:
Imho the first bug should be fixed first. The second is more an enhancement (and a bit of ugliness), but not really a problem. |
I'm facing similar error with FAKE 6.1.1 when trying to run on .NET 8 globals.json, and the issue is probably that .NET compiles a build.fsx to a temporary dll under .fake directory, but then because it's .NET 8 dll, then FAKE (build with .NET 6) cannot read it properly and doesn't find the entry-point |
If you want to migrate everything to .NET 8, I support |
Description
I got the following error so I'm opening an issue as requested.
CACHING WARNING
this might happen after Updates...
please open a issue on FAKE and /cc @matthid ONLY IF this happens reproducibly)
Error: System.Exception: We could not find a type similar to '<StartupCode$Hello_39CC74F39529626A47F150CE9573BBEA9E7A121F27DB517781F4AAE80B07F7A3>.$Hello$fsx' containing a 'main@' method in the cached assembly (D:\projects\Scripts.fake\Hello.fsx\Hello_39CC74F39529626A47F150CE9573BBEA9E7A121F27DB517781F4AAE80B07F7A3.dll)!
at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1647.Invoke(String message)
at Yaaf.FSharp.Scripting.Helper.consoleCapture[a](TextWriter out, TextWriter err, FSharpFunc
2 f) in D:\a\1\s\src\app\Fake.Runtime\YaafFSharpScripting.fs:line 1242 at Fake.Runtime.CompileRunner.tryRunCached(CoreCacheInfo c, FakeContext context) in D:\a\1\s\src\app\Fake.Runtime\CompileRunner.fs:line 47 at Fake.Runtime.CompileRunner.runFakeScript(FSharpOption
1 cache, FakeContext context) in D:\a\1\s\src\app\Fake.Runtime\CompileRunner.fs:line 155Script is not valid:
commandLineArgs (0,0)-(0,0): Error FS2014: A problem occurred writing the binary 'D:\projects\Scripts.fake\Hello.fsx\Hello_39CC74F39529626A47F150CE9573BBEA9E7A121F27DB517781F4AAE80B07F7A3.dll': Could not open file for writing (binary mode): D:\projects\Scripts.fake\Hello.fsx\Hello_39CC74F39529626A47F150CE9573BBEA9E7A121F27DB517781F4AAE80B07F7A3.dll
Repro steps
Please provide the steps required to reproduce the problem
Create a script called hello.fsx
fake run hello.fsx
fake run Hello.fsx (capital H!)
Expected behavior
No error.
Actual behavior
The error.
Known workarounds
Correct capitalization.
Related information
The text was updated successfully, but these errors were encountered: