ctaggart / SourceLink

Source Code On Demand
MIT License
357 stars 55 forks source link

SourceLink.Copy.PdbFiles #315

Closed ctaggart closed 6 years ago

ctaggart commented 6 years ago

SourceLink.Copy.PdbFiles just packages up the workaround @jnm2 came up with to address https://github.com/ctaggart/SourceLink/issues/313.

I'm guessing we may need to add some conditions so that this only applied to netfx.

jnm2 commented 6 years ago

Are we sure that netfx is the only platform that fails to copy PDBs? What about UWP etc?

ctaggart commented 6 years ago

@jnm2 No. Looking at the target frameworks, I think it is just netcoreapp we should not copy pdb files for. Any idea how to actually create this correctly?

<IsNetCoreApp Condition="'$(TargetFramework).StartsWith(%27netcoreapp%27)'=='True'">true</IsNetCoreApp>
jnm2 commented 6 years ago

@ctaggart This is what I've done for .NET Framework. There's probably a TargetFrameworkIdentifier for .NET Core. https://github.com/nunit/nunit/blob/259066fb2b8edb753f982a88662834e0c6a09215/src/NUnitFramework/framework/nunit.framework.csproj#L14

What's the behavior for .NET Standard?

ctaggart commented 6 years ago

What's the behavior for .NET Standard?

SourceLink.Copy.PdbFiles is intended for apps, not libraries, but probably good to add some safety.

jnm2 commented 6 years ago

Yes. My hope is that one day, netstandard console apps and test project will be the rule. (See https://github.com/Microsoft/msbuild/issues/1310#issuecomment-346114774 thru Jared's comment.)