12

に次の構成の .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使用するタスクを変更すると、ソース リンクが機能しなくなります。ReleaseConfiguration to package

Release DLL を内部に含む Nuget パッケージを生成する方法はありますか? Source Link を Symbol Server と連携させるにはどうすればよいですか?

.nuspecこれが唯一の方法である場合は、CLI と一緒にファイルを使用してもかまいませんが、Nuget パッケージ内にファイルNugetを含めたくありません。.pdb

ありがとう

4

0 に答える 0