に次の構成の .NET Standard 2.0TestSouceLink
プロジェクトがあります.csproj
。
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<Authors>Jérôme MEVEL</Authors>
<Description>Just a test package for SourceLink</Description>
<Version>1.1.1</Version>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.Vsts.Git" Version="1.0.0-beta2-18618-05">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
ビルド パイプラインで Nuget パッケージを生成する Azure DevOps サーバーがあります。
Publish symbols path
ファイルを Symbol Serverにプッシュするタスクを最後に追加し、.pdb
ソース リンクを Azure DevOps Symbol Server と共にデバッグビルド構成のみで動作させることができました。
問題は、Nuget パッケージの DLL をデバッグ モードで生成したくないことです。Releaseにしたい。しかし、テキスト ボックスでdotnet pack
使用するタスクを変更すると、ソース リンクが機能しなくなります。Release
Configuration to package
Release DLL を内部に含む Nuget パッケージを生成する方法はありますか? Source Link を Symbol Server と連携させるにはどうすればよいですか?
.nuspec
これが唯一の方法である場合は、CLI と一緒にファイルを使用してもかまいませんが、Nuget パッケージ内にファイルNuget
を含めたくありません。.pdb
ありがとう