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

Add rule to create self-contained binaries for .NET Core #72

Open
j3parker opened this issue Sep 26, 2019 · 1 comment
Open

Add rule to create self-contained binaries for .NET Core #72

j3parker opened this issue Sep 26, 2019 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@j3parker
Copy link
Member

csharp_binary outputs IL files ("DLLs", but we currently give them a .exe extension anyway) but people will probably want the ability to create self-contained executable files.

With the usual SDK, you use dotnet publish --self-contained (see the docs).

I don't think this should be the default, because it would be simpler to keep everything in DLLs within the build graph (e.g. so you can add the output of csharp_binary to the deps of another rule.. a common use case being tests). I think we should have a specific rule for "packaging" a binary up. These rules wouldn't emit CSharpAssembly_* providers.

We need to investigate how this stuff works more. We don't have access to dotnet publish directly because we don't have the SDK. The SDKs are framework-specific, and right now we are manually using the runtime + the compiler as our toolchain (rather than having one toolchain per (platform, framework) pair).

@j3parker j3parker added the enhancement New feature or request label Sep 26, 2019
@j3parker j3parker added this to the v1 milestone Sep 26, 2019
@jrbeverly
Copy link
Contributor

As of #97, we now have access to the full SDK. So for this task we now have access to dotnet publish directly.

For publishing up a self-contained binary I suspect we would have to generate a csproj file (similar to ResX). This would also likely be the case for #30.

There is discussion of this nature for dotnet pack about needing to generate a stub csproj file.

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

No branches or pull requests

2 participants