-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 <EmbedSources>true</EmbedSources> in CSharp/VB.core.targets #15250
Comments
cc @nguerrera |
CLI will be using the same targets so we only need the feature in core targets. The #line discovery is not supposed to be limited to /embed with no args. The latter is purely shorthand for /embed: repeating all source files. So I would expect the "workaround" to be semantically perfect. You might need to put it in a target that runs just before compile if you want to embed anything dynamically added to @(Compile) such as the target framework attribute. |
@nguerrera Ok. I still think we should expose the true so people don't have to use the Include syntax to get it to work. |
@nguerrera I assume this is part of the embed source feature (#12625) and you're the right person to own this. Can you triage into a milestone? |
I think we should finish embedded source support in 15.6 |
Let's track this with #19127. There's bit more detail there. |
Microsoft (R) Visual C# Compiler version 2.0.0.61104
<Embed>true</Embed>
in csprojWorkaround or another approach:
<EmbeddedFiles Include="@(Compile);@(AdditionalFiles)" />
I'd prefer an option that stays true to the /embed compiler option mainly because it figures out the
#line
directive based other files that need inclusion.This is likely fixable in the Core.targets and the build task. But I'd also like this to work in .NET CLI, I'm assuming that CLI will be using these targets?
The text was updated successfully, but these errors were encountered: