Build/Test Issues

Build errors from SourceLink put NCrunch into weird state

Started by kierenj on 2,433 views

I have a .NET Core solution (targetting a few platforms) and tried applying SourceLink to it, by adding the following to all the csprojs:

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>

<!-- Optional: Declare that the Repository URL can be published to NuSpec -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>

<!-- Optional: Embed source files that are not tracked by the source control manager to the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>

<!-- Optional: Include PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-62925-02" PrivateAssets="All"/>
</ItemGroup>

For the net461, netstandard2.0 targets NCrunch reported a build error (from the SourceLink .targets file I guess) that it couldn't work out where the git repo was.

That's understandable and maybe something to work around but kind of not NCrunch's fault.

However for the (much more simply-targetting) projects, they failed without error message, and NCrunch didn't stop the whole build/discovery process "properly".

Quick screen capture:
https://kierenj.tinytake.com/sf/MjY0NzAzMV83OTUwMDAw
Hi, thanks for sharing this problem.

Is it possible that the projects are simply not being built because they rely on one of the other projects with a build failure? (Sorry I can't establish the dependency chain in the screen capture).

Post a reply

Log in to reply.