bflattened / bflat Goto Github PK
View Code? Open in Web Editor NEWC# as you know it but with Go-inspired tooling (small, selfcontained, and native executables)
License: GNU Affero General Public License v3.0
C# as you know it but with Go-inspired tooling (small, selfcontained, and native executables)
License: GNU Affero General Public License v3.0
Hey. Awesome project. Quick question: Do you have any plans to support 32bit targets? Would be awesome to use bflat with low-cost MCUs. Thanks. Peter
Hello!
Since this can even run in EFI, I wonder if it's possible to write a windows kernel-mode driver in C# with the help of zerolib? I think that'll be pretty cool.
gcc++
, for example, has the ability to build all files in specified folder: "${fileDirname}/*.cpp
The reason I ask the same for bflat is because right now, just making basic task for VSCode turns into miserable experience:
etc, etc
Something like:
bflat build -o D:\artifacts\whatever.exe --batch D:\project\mybflatthing
where file path now treated as folder path and will search all *.cs recursively.
When attempting to build BFlat (the compiler itself) on Linux, at the project build step (not targets), I get
Failed to download file "https://github.com/bflattened/runtime/releases/download/v7.0.2-rtm.22631.1/bflat-compiler-native-.zip". Response status code does not indicate success: 404 (Not Found).
Same nuget config successfully builds on Windows, so guessing it's something with my Linux setup. Running on x64 Manjaro Arch, same issue when running dotnet build
on cli, or using Rider.
How does this interface with the actual hardware?
it looks like your screen buffer doesn't point to a memory address at all, it's just a fixed buffer.
I am looking into this for OS development as in building a micro kernel, drivers, and a desktop.
So far from the looks of the source code it's not really meant to be taken seriously.
bflat build
(without arguments) currently builds all *.cs files in the current directory. Would be nice to be able to add source files from different directories. A directory corresponds to a module.
We can use an INI file format that looks like Rust's TOML but has less useless ceremony.
When I compile my c# app using these flags:
bflat.exe build --os:windows --no-reflection --no-stacktrace-data --no-globalization --no-exception-messages --Os
then my app gives following exception:
[Exception!] -> EETypeRva:0x00057E60: Reflection_Disabled
at App!<BaseAddress>+0x16278d
at App!<BaseAddress>+0xeea6b
at App!<BaseAddress>+0x16e0ec
at App!<BaseAddress>+0xedf69
at App!<BaseAddress>+0xede6c
If I omit "--no-stacktrace-data" aiming to see exact stack trace line numbers and use:
bflat.exe build --os:windows --no-reflection --no-globalization --no-exception-messages --Os
then the compiler gives following warning message:
ILC: AOT analysis warning IL1005:
Internal.StackTraceMetadata.StackTraceMetadata.GetMethodNameFromStartAddressIfAvailable(IntPtr):
Method will always throw because: Failed to load assembly 'System.Private.Reflection.Core'
And if I execute my app .exe ignoring this ILC analysis warning, it fails without giving any stack trace info at all.
The only way for me seems to be working is to omit "--no-reflection" flag, but this leads to significantly larger file size sadly.
Windows 10 amd64, dotnet --version: 6.0.100-preview.5.21302.13.
I wonder if this is expected behavior or not?
Hi,
Can we use this to build any HTTP Api kinda thing or use in Lambda?
Thanks
Like you made sample to output minimalist executable with respect to file size,
are there any settings which focuses on speed and how further assembly can be made fast ?
Between I did small test.
C# executable was doing an work for 370ms.
And same code in bflat took 290ms.
Impressive !
Most of the time, projects depending on each other. Processing each of them manually is very difficult because of circular dependency. It's better if we could process projects (.csproj) or a solution (.sln) directly as input.
Would it be possible to use a .csproj
as input instead of listing all the .cs
files?
Suppose I'm shipping a product that includes several executables. Each of them will bundle the complete runtime, increasing the size of the application.
Would it be possible to (optionally) separate the runtime into a shared library for these cases?
Please consider. Thank you.
We need some sort of project and solution structure whether that be csproj files and sln files or just json or toml.
Part of what makes C# so great is it's build system, it's easy.
Calling bflat compiler or making sh/bat script really isn't going to do it.
I'm trying to build a winforms code using .NET 7 shared DLLs.
using System;
using System.Windows.Forms;
Application.Run(new Form());
Build command:
$ cd dotnet-sdk-7.0.101-win-x64\shared\Microsoft.WindowsDesktop.App\7.0.1
$ bflat build main.cs -r System.Windows.Forms.dll --ldflags "/subsystem:windows"
Output:
...Failed to load assembly 'System.Windows.Forms.Primitives'
# added -r System.Windows.Forms.Primitives.dll
...Failed to load assembly 'System.Drawing.Common'
# added -r System.Drawing.Common.dll
...Failed to load assembly 'Accessibility'
...Failed to load assembly 'Microsoft.Win32.SystemEvents'
Finally, it's done after I added all missing dependencies by hand 😪
-r System.Windows.Forms.dll
-r System.Windows.Forms.Primitives.dll
-r System.Drawing.Common.dll
-r Accessibility.dll
-r Microsoft.Win32.SystemEvents.dll
*.dll
😀bflat is GPL-licensed.
Does this means bflat is unsuitable for developing non-GPL software?
Is there any way to enable global usings (including the default global usings) and include custom global usings.
For now in josephmoresena/NativeAOT-AndroidHelloJniLib@012ea69 I included dotnet-generated GlobalUsings.g.cs file to be used by BFlat.
Something like //go:embed
, except not done as a tasteless comment.
Sounds like a task for a source generator. Maybe there's something that can be used for this available already.
There doesn't seem to be any explanation on how to build larger projects/solutions.
Is that even possible?
Program.cs referencing Brotli.Net.dll which uses Marshal/dynamic feature
the exe is generated but when run, it throw exception Type not found
I read online it says need to create rd.xml and set Dynamic="Require All". How to make bflat to use rd.xml?
Linux build of the compiler can be produced, but currently fails at runtime due to #3. Apparently the C# compiler needs to compute the SHA hashes of source files it's compiling and the .NET libraries delegate SHA computations to libssl that we try to load with dlopen).
A sample application:
using System;
using System.Net.Http;
var http = new HttpClient();
var url = "https://google.com";
var resp = await http.GetAsync(url);
var contents = await resp.Content.ReadAsStringAsync();
Console.WriteLine($"Result is {contents.Length} bytes.");
Console.ReadLine();
Compiling it under Windows 10 produces an executable and a load of warning messages:
D:\work\bflat>bflat build test.cs
ILC: AOT analysis warning IL3055: System.Net.Quic.Implementations.MsQuic.Internal.MsQuicNativeMethods.SetCallbackHandlerDelegate.Invoke(SafeHandle,Delegate,IntPtr): P/invoke method 'Internal.CompilerGenerated.PInvokeDelegateWrapper__SetCallbackHandlerDelegate.ForwardNativeFunctionWrapper__SetCallbackHandlerDelegate(SafeHandle,Delegate,IntPtr)' declares a parameter with an abstract delegate. Correctness of interop for abstract delegates cannot be guaranteed after native compilation: the marshalling code for the delegate might not be available. Use a non-abstract delegate type or ensure any delegate instance passed as parameter is marked with `UnmanagedFunctionPointerAttribute`.
D:\a\runtime\runtime\src\libraries\System.Net.Quic\src\System\Net\Quic\Implementations\MsQuic\Interop\MsQuicNativeMethods.cs(154): AOT analysis warning IL3050: System.Net.Quic.Implementations.MsQuic.Internal.MsQuicNativeMethods.AnyDelegateMarshaller.AnyDelegateMarshaller(Delegate): Using member 'System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(Delegate)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. Marshalling code for the delegate might not be available. Use the GetFunctionPointerForDelegate<TDelegate> overload instead.
D:\a\runtime\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs(177): AOT analysis warning IL3050: System.Runtime.InteropServices.Marshal.OffsetOf<T>(String): Using member 'System.Runtime.InteropServices.Marshal.OffsetOf(Type,String)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling.
D:\a\runtime\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs(52): AOT analysis warning IL3050: System.Runtime.CompilerServices.RuntimeHelpers.GetSubArray<T>(!!0[],Range): Using member 'System.Array.CreateInstance(Type,Int32)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. The native code for the array might not be available at runtime.
ILC: Method '[System.Net.Security]System.Net.Security.SslStream+<ReadAsyncInternal>d__179`1<System.Net.Security.AsyncReadWriteAdapter>.MoveNext()' will always throw because: The format of a DLL or executable being loaded is invalid
ILC: Method '[System.Net.Security]System.Net.Security.SslStream+<ReadAsyncInternal>d__179`1<System.Net.Security.SyncReadWriteAdapter>.MoveNext()' will always throw because: The format of a DLL or executable being loaded is invalid
ILC: Method '[System.Net.Security]System.Net.Security.SslStream+<<WriteSingleChunk>g__WaitAndWriteAsync|173_0>d`1<System.Net.Security.SyncReadWriteAdapter>.MoveNext()' will always throw because: The format of a DLL or executable being loaded is invalid
ILC: Method '[System.Net.Security]System.Net.Security.SslStream+<EnsureFullTlsFrameAsync>d__177`1<System.Net.Security.SyncReadWriteAdapter>.MoveNext()' will always throw because: The format of a DLL or executable being loaded is invalid
ILC: Method '[System.Net.Security]System.Net.Security.SslStream+<EnsureFullTlsFrameAsync>d__177`1<System.Net.Security.AsyncReadWriteAdapter>.MoveNext()' will always throw because: The format of a DLL or executable being loaded is invalid
ILC: Method '[System.Net.Security]System.Net.Security.SslStream+<ForceAuthenticationAsync>d__166`1<System.Net.Security.SyncReadWriteAdapter>.MoveNext()' will always throw because: The format of a DLL or executable being loaded is invalid
ILC: Method '[System.Net.Security]System.Net.Security.SslStream+<ForceAuthenticationAsync>d__166`1<System.Net.Security.AsyncReadWriteAdapter>.MoveNext()' will always throw because: The format of a DLL or executable being loaded is invalid
ILC: Method '[System.Net.Security]System.Net.Security.SslStream+<<WriteSingleChunk>g__WaitAndWriteAsync|173_0>d`1<System.Net.Security.AsyncReadWriteAdapter>.MoveNext()' will always throw because: The format of a DLL or executable being loaded is invalid
ILC: Method '[System.Net.Security]System.Net.Security.SslStream.WriteSingleChunk<SyncReadWriteAdapter>(ReadOnlyMemory`1<uint8>,CancellationToken)' will always throw because: The format of a DLL or executable being loaded is invalid
ILC: Method '[System.Net.Security]System.Net.Security.SslStream.WriteSingleChunk<AsyncReadWriteAdapter>(ReadOnlyMemory`1<uint8>,CancellationToken)' will always throw because: The format of a DLL or executable being loaded is invalid
Running the executable produces an exception:
D:\work\bflat>test
Unhandled Exception: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowBadImageFormatException(ExceptionStringID) + 0x31
at System.Net.Security.SslStream.WriteSingleChunk[TIOAdapter](ReadOnlyMemory`1, CancellationToken) + 0xe
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine&) + 0x40
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean, Byte[], CancellationToken) + 0x70
at System.Net.Security.SslStream.ProcessAuthenticationAsync(Boolean, CancellationToken) + 0x6a
at System.Net.Security.SslStream.AuthenticateAsClientAsync(SslClientAuthenticationOptions, CancellationToken) + 0x50
at System.Net.Http.ConnectHelper.<EstablishSslConnectionAsync>d__2.MoveNext() + 0xc0
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.<EstablishSslConnectionAsync>d__2.MoveNext() + 0x413
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at System.Net.Http.HttpConnectionPool.<ConnectAsync>d__96.MoveNext() + 0xafe
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at System.Net.Http.HttpConnectionPool.<CreateHttp11ConnectionAsync>d__98.MoveNext() + 0x259
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at System.Net.Http.HttpConnectionPool.<AddHttp11ConnectionAsync>d__73.MoveNext() + 0x224
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.<WaitWithCancellationAsync>d__1.MoveNext() + 0x170
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at System.Net.Http.HttpConnectionPool.<GetHttp11ConnectionAsync>d__75.MoveNext() + 0x337
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
at System.Net.Http.HttpConnectionPool.<SendWithVersionDetectionAndRetryAsync>d__83.MoveNext() + 0x8e8
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at System.Net.Http.RedirectHandler.<SendAsync>d__4.MoveNext() + 0x1e2
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at System.Net.Http.HttpClient.<<SendAsync>g__Core|83_0>d.MoveNext() + 0x3e0
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at Program.<<Main>$>d__0.MoveNext() + 0x13a
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at Program.<Main>(String[]) + 0x20
at test!<BaseAddress>+0x6c311a
Is it a known limitation of the current version?
using System;
using System.Runtime.CompilerServices;
namespace Test
{
class Program
{
public static int _counter = 0;
public static void Main()
{
Console.WriteLine($"Hello world {++_counter}");
}
[ModuleInitializer]
public static void Init()
{
_counter = 999;
}
}
}
output:
Hello world 1
EDIT:
It does not work with NativeAOT.
So i opened the issue there: dotnet/runtimelab#1315
First of all sry for putting this here, but I have no idea how to contact you otherwise.
I'm sure you know this but here it goes anyway. An equivalent of c# in musical theory is actually dflat not bflat. I presume
you knew this but still chose to use bflat as a name for your own reasons, but maybe you didn't...
I also think dflat would maybe be a better name not only for being equivalent to c# but also because there is already a
systems language D so Dflat would be a great word play since this is kind of a systems language/tooling ...
Anyways, just thought I should point it out. Thanks and good luck :)
I would like it if this can be used to build native things for MacOS without needing to self contain with the runtime (and as a consequence a ton of files that could and sometimes would need to go into the application bundle for a program even if it's a simple Avalonia application).
I love the idea of this project to compete with Golang, but I don't think there is a neat way to resolve external dependency problem. Unfortunately, this also mean you'd have to implement some kind of module support, just like Go Modules, which is a hot mess. In Golang you can just import from GitHub, but in .NET world most of us use nuget. More specifically, should we pull the nuget manifest every time we see one in the parent directory and link it this way?
Related: #1 but specifically targeting nuget
Hello,
I am making an implementation for the ``System.Runtime.InteropServices.NativeMemory'' class but i need (what seems to be) a class constructor for 'System.Span`1', and i have no clue what it should do or what it needs to look like. I opened this so that anyone who knows about it can comment and leave suggestions.
what's the differences between Exe, WinExe and Shared? not seen in document.
I would like to build an Winform referencing several other lib projects which output DLLs, i want to Bflat them all, how can i do it.
It seems Compile referenced lib projects to Shared doesn't work.
I'm not using this issue to push the creator to support F#. This is for the F# community to figure out if this is something that any of us are interested in working on testing/implementing. Also to track what needs to be done or changed to get it working. I personally think the zero version could be very compelling for F#.
Because we link the executable statically with no dependencies on target system's libc, it makes supporting dynamic loading annoying (MUSL that we link against really doesn't want to allow that). We basically can't call dlopen without weird and unportable workarounds (like https://github.com/pfalcon/foreign-dlopen).
I see a couple options:
DllImport currently only works for things we link in statically (i.e. pretty much just the framework built-in DllImports).
Sorry to be that guy!
This sounds super promising, I love your philosophy. I'd be super interested if you ever made a macOS version of the compiler :)
I use --no-stacktrace-data --no-globalization --no-exception-messages
and get a binary of 6MB+
does bflat uses trimming?
Executing task: d:\Programs\bflat\bflat.exe build -o d:\Unlinked\repos\PETest\Program.exe --reference d:\Unlinked\repos\PETest\refs\PeNet.dll d:\Unlinked\repos\PETest\refs\PeNet.Asn1.dll --no-reflection --no-stacktrace-data --no-globalization --no-exception-messages --optimize-space d:\Unlinked\repos\PETest\Program.cs <
I tried different ways, commas and what not, no matter it always tries to read them as source files.
new Option<string[]>(new string[] { "-r", "--reference" },
"Additional .NET assemblies to include")
{
ArgumentHelpName = "file list"
};
It works if I specify single file but then if I have unrelated references it would fail at build.
Libssl is loaded dynamically through dlopen https://github.com/dotnet/runtimelab/blob/06f08facc0e0efbaff755dd5957485edf2771ea7/src/libraries/Native/Unix/System.Security.Cryptography.Native/opensslshim.c#L53-L134.
The same problem for ICU.
This doesn't work because of #2. We either need to fix #2 or rewrite this to link statically.
I think I saw a POC once that took out the garbage collector. This could be useful for one of our applications that does very little and I think has no allocations once running. Of course I may be wrong on that if some internals of .net would always be generating allocations (instrumentation?).
I mainly want to reduce the start-up time of the app, I don't know how much impact GC has on that.
With .NET 6, is it possible to AOT-compile to WebAssembly/WASI?
I decided to try to build my own application, and I ended up with this error:
As far as I understand, there is no support for nuget packages. How do I fix my problem?
Link to my repo - https://github.com/ketronix-dev/appimage-installer
error: Unable to create file for E:\下载\bflat-0.0.4-windows-x64\test.obj: 在多字节的目标代码页中,没有此 Unicode 字符可以映射到的字符。
Error: Fail to initialize Native Object Writer
System.IO.IOException: Fail to initialize Native Object Writer
at ILCompiler.DependencyAnalysis.ObjectWriter..ctor(String, NodeFactory, ObjectWritingOptions) + 0x227
at ILCompiler.DependencyAnalysis.ObjectWriter.EmitObject(String, IReadOnlyCollection`1, NodeFactory, ObjectWritingOptions, IObjectDumper, Logger) + 0x8a
at ILCompiler.RyuJitCompilation.CompileInternal(String, ObjectDumper) + 0xa8
at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String, ObjectDumper) + 0x2c
at Program.Run(String[]) + 0x2fe3
at Program.Main(String[]) + 0x31
The error message seems to be No mapping for the Unicode character exists in the target multi-byte code page
. And it works after I moving bflat itself to ascii only path. I'm ok with won't fix
but I think it should be noted.
Hi, thank you for this tool. It is amazing!
I was able to compile a large project thanks to the issue #7 where you specified the "-r" arg parameter.
Would be very useful to have a list of params that bflat accepts
Is there a way to reference a dll? I'm trying to build a project and when I do bflat build I get this
error CS0246: The type or namespace name 'Serilog' could not be found (are you missing a using directive or an assembly reference?)
got a warning during compilation on this line (22) :
var assembly = Assembly.Load(memoryBytes);
message says :
D:\Program.cs(22): Trim analysis warning IL2026: Program.Main(String[]): Using method 'System.Reflection.Assembly.Load(Byte[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types and members the loaded assembly depends on might be removed.
and at runtime when i run the compiled output i got :
D:\bflat\Program.exe
Unhandled Exception: System.PlatformNotSupportedException: Operation is not supported on this platform.
at Internal.Reflection.Execution.AssemblyBinderImplementation.Bind(Byte[], Byte[], AssemblyBindResult&, Exception&) + 0x39
at System.Reflection.Runtime.Assemblies.RuntimeAssembly.GetRuntimeAssemblyFromByteArray(Byte[], Byte[]) + 0x56
at Program.Main(String[]) + 0x5f
at Program!<BaseAddress>+0x2d7bbf
This seems like a pretty cool project! I wanted to try it out, so I downloaded the latest release and put it in /usr/local/bin
because that directory was already on my path. That's where I put most binaries I download that I want to run, that I don't plan on upgrading over time.
My bflat
file:
> which bflat
/usr/local/bin/bflat
> file $(which bflat)
/usr/local/bin/bflat: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped
> bflat -v
7.0.1
My hello.cs
file:
System.Console.WriteLine("Hello World!");
Output from bflat build hello.cs
:
Error: IO_PathNotFound_Path, /usr/local/bin/ref
System.IO.DirectoryNotFoundException: IO_PathNotFound_Path, /usr/local/bin/ref
at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String, Boolean) + 0xa8
at System.IO.Enumeration.FileSystemEnumerator`1.Init() + 0x1c
at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String, FileSystemEnumerable`1.FindTransform, EnumerationOptions, Boolean) + 0x89
at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String, String, EnumerationOptions) + 0x97
at System.IO.Directory.InternalEnumeratePaths(String, String, SearchTarget, EnumerationOptions) + 0x77
at System.IO.Directory.GetFiles(String, String, EnumerationOptions) + 0x38
at CommonOptions.GetReferencePaths(String[], StandardLibType) + 0xc8
at BuildCommand.Handle(ParseResult) + 0x181
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext() + 0x10b
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x1c
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xc2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x44
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext() + 0xfd
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x1c
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xc2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x44
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext() + 0xbd
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x1c
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xc2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x44
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseVersionOption>b__0>d.MoveNext() + 0x1c0
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x1c
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xc2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x44
at System.CommandLine.Invocation.InvocationPipeline.<Invoke>g__FullInvocationChain|3_0(InvocationContext) + 0x9a
at Program.Main(String[]) + 0x20b
System info:
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
I was wondering, how does bflat work with additional native and managed dlls?
would the managed dlls be "included" in the created executable?
will the native dlls be used by the exe?
would it be possible to, somehow, include native code (compiled c++) directly in the generated executable?
A question i have, do you guys ever plan to implement inline assembly for UEFI bare metal programs? doing osdev with this would be a dream
Hi,
I have a small program that accesses a MS SQLserver database. When compiling with bflat I get the following error "The type name 'SqlConnection' could not be found in the namespace 'System.Data.SqlClient'. This type has been forwarded to assembly 'System.Data.SqlClient, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Consider adding a reference to that assembly.".
The reference is there (see attachment), so I don't understand what is going wrong.
Shared libraries can only be created for Windows right now.
My project compiles well with Dotnet compiler, but errors reported with bflat. I don't see any arg to specify which c# version BFlat currently uses or to alter it.
Is this a big issue for source compatibility?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.