C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform
设置 Other console options:/Framework:".NETCoreApp,Version=v2.0"
<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>false</EmbedUntrackedSources>
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
特别是License
节点,在本地 push 的时候不会出问题,在 Azure DevOps 环境下 Push 没有这个会出问题,不能够远程调试。
SourceLink
程序集,下面是以代码提交到 GitHub 为例:<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
其他平台对应的 lib 可参考 https://github.com/dotnet/sourcelink
然后将程序集 push 到 nuget.org 时也会同时将snupkg
文件 push 到符号服务器
要使用远程调试需要对 Visual Studio 做一些配置
原文:https://www.cnblogs.com/qinjin/p/AzureDevOps-Trap.html