Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/Sentry/Sentry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,19 @@
<None Include="buildTransitive\Sentry.SourceGenerators.targets" Pack="true" PackagePath="build\Sentry.SourceGenerators.targets" />
</ItemGroup>

<!-- Build and Pack (without dependency to) Roslyn Components / Compiler Extensions (as "analyzers"). -->
<ItemGroup>
<None Include="..\Sentry.SourceGenerators\bin\Release\netstandard2.0\Sentry.SourceGenerators.dll"
Pack="true"
PackagePath="analyzers/dotnet/cs"
Visible="false" />
<ProjectReference Include="..\Sentry.SourceGenerators\Sentry.SourceGenerators.csproj" OutputItemType="" ReferenceOutputAssembly="false" PrivateAssets="all" SetTargetFramework="TargetFramework=netstandard2.0" SentryAnalyzersPack="true" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: parallel builds

Workflows sometimes run into:

/Users/runner/.dotnet/sdk/9.0.301/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(323,5): error MSB4018: System.IO.IOException: The process cannot access the file '/Users/runner/work/sentry-dotnet/sentry-dotnet/src/Sentry.SourceGenerators/bin/Release/netstandard2.0/Sentry.SourceGenerators.deps.json' because it is being used by another process. [/Users/runner/work/sentry-dotnet/sentry-dotnet/src/Sentry.SourceGenerators/Sentry.SourceGenerators.csproj]

</ItemGroup>
<!-- See https://learn.microsoft.com/dotnet/core/project-sdk/overview -->
<!-- See also https://github.com/ViktorHofer/PackAsAnalyzer -->
<Target Name="_SentryPackAnalyzers" BeforeTargets="_GetPackageFiles">
<MSBuild Projects="@(ProjectReference->WithMetadataValue('SentryAnalyzersPack', 'true'))" Targets="GetTargetPath">
<Output TaskParameter="TargetOutputs" ItemName="_SentryAnalyzersPackagePath" />
</MSBuild>
<ItemGroup>
<None Include="@(_SentryAnalyzersPackagePath)" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>
</Target>

</Project>
Loading