The recently-released .NET tooling seem to have support for embedding C# in PDBs, which should improve the experience of stepping into third-party, etc. Running csc /?
, I can clearly see the /embed option: "Embed all source files in the PDB."
However, there doesn't seem to be any way to specify this in csproj. What's more, there doesn't seem to be any provisions for passing arbitrary switches to the compiler, which I would use to manually pass /embed.
Can anyone confirm that I haven't missed anything and that build support for /embed is currently lacking? Is there an issue for this (and if not where would it go)? Any suggested workaround would be appreciated too.
Embedded C is generally used to develop microcontroller-based applications. C is a high-level programming language. Embedded C is just the extension variant of the C language. This programming language is hardware independent.
Embedded C programming plays a key role in performing specific function by the processor. In day-to-day life we used many electronic devices such as mobile phone, washing machine, digital camera, etc. These all device working is based on microcontroller that are programmed by embedded C.
It is the most popular language for embedded systems developers and is used in nearly 80% of all embedded projects.
Yes, embedded software engineering is a good career which offers a high salary.
There's now a proper MSBuild EmbedAllSources
property:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<EmbedAllSources>true</EmbedAllSources>
[...]
From what I observed locally, it behaves the same as the mentioned EmbedFiles
target.
Looks like the roslyn task should support them via the EmbeddedFiles Item Group, by adding this to your .csproj:
<Target Name="EmbedSources" BeforeTargets="CoreCompile">
<ItemGroup>
<EmbeddedFiles Include="@(Compile) " />
</ItemGroup>
</Target>
... which is basically what the /embed option does.
You probably need to also provide a SourceLink
json file, to wire up the sources in the PDB, not sure that happens automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With