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 <EmbedSources>true</EmbedSources> in CSharp/VB.core.targets #15250

Closed
mjsabby opened this issue Nov 15, 2016 · 6 comments
Closed

Add <EmbedSources>true</EmbedSources> in CSharp/VB.core.targets #15250

mjsabby opened this issue Nov 15, 2016 · 6 comments

Comments

@mjsabby
Copy link
Contributor

mjsabby commented Nov 15, 2016

Microsoft (R) Visual C# Compiler version 2.0.0.61104

  1. Create a CSProj in VS 2017 RC
  2. Try the embedding source feature, via <Embed>true</Embed> in csproj
  3. Looks like the MSBuild wire up doesn't work for this compiler option

Workaround 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?

@mjsabby
Copy link
Contributor Author

mjsabby commented Nov 15, 2016

cc @nguerrera

@nguerrera
Copy link
Contributor

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.

@mjsabby
Copy link
Contributor Author

mjsabby commented Nov 15, 2016

@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.

@jcouv
Copy link
Member

jcouv commented Jun 7, 2017

@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?

@tmat tmat added this to the 15.6 milestone Jun 7, 2017
@tmat
Copy link
Member

tmat commented Jun 7, 2017

I think we should finish embedded source support in 15.6

@nguerrera
Copy link
Contributor

Let's track this with #19127. There's bit more detail there.

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

No branches or pull requests

5 participants