Skip to content

Commit a4a3c30

Browse files
authored
chore: checks platform support in sentry.profiling (#3371)
1 parent a8859d8 commit a4a3c30

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

src/Sentry.Profiling/Sentry.Profiling.csproj

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,22 @@
2424
<InternalsVisibleTo Include="Sentry.Profiling.Tests" PublicKey="$(SentryPublicKey)" />
2525
</ItemGroup>
2626

27+
<!-- Packaging -->
28+
<ItemGroup>
29+
<None Include="$(MSBuildThisFileDirectory)buildTransitive\Sentry.Profiling.targets" Pack="true" PackagePath="buildTransitive\Sentry.Profiling.targets" />
30+
<None Include="$(MSBuildThisFileDirectory)buildTransitive\Sentry.Profiling.targets" Pack="true" PackagePath="build\Sentry.Profiling.targets" />
31+
</ItemGroup>
2732
<ItemGroup>
2833
<ProfilingDependency Include="..\..\modules\perfview\src\FastSerialization\bin\$(Configuration)\netstandard2.0\Microsoft.Diagnostics.FastSerialization.dll" />
2934
<ProfilingDependency Include="..\..\modules\perfview\src\TraceEvent\bin\$(Configuration)\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll" />
3035
<ProfilingDependency Include="..\..\modules\perfview\src\FastSerialization\bin\$(Configuration)\netstandard2.0\Microsoft.Diagnostics.FastSerialization.pdb" />
3136
<ProfilingDependency Include="..\..\modules\perfview\src\TraceEvent\bin\$(Configuration)\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.pdb" />
3237
</ItemGroup>
33-
<ItemGroup>
34-
<!-- TODO: pdb's are getting packed on the nupkg (as well as the snupkg), figure out a way to exclude from nupkg-->
35-
<TfmSpecificPackageFile Include="@(ProfilingDependency)">
36-
<Pack>true</Pack>
37-
<PackagePath>lib\$(TargetFramework)</PackagePath>
38-
</TfmSpecificPackageFile>
39-
</ItemGroup>
38+
<ItemGroup>
39+
<!-- TODO: pdb's are getting packed on the nupkg (as well as the snupkg), figure out a way to exclude from nupkg-->
40+
<TfmSpecificPackageFile Include="@(ProfilingDependency)">
41+
<Pack>true</Pack>
42+
<PackagePath>lib\$(TargetFramework)</PackagePath>
43+
</TfmSpecificPackageFile>
44+
</ItemGroup>
4045
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<Target BeforeTargets="BeforeBuild" Name="CheckPlatformSupport">
3+
<Error Text="Package Sentry.Profiling is not supported on platform '$(TargetPlatformIdentifier)'."
4+
Condition="'$(TargetPlatformIdentifier)' == 'android'" />
5+
<Error Text="Package Sentry.Profiling is not supported on platform '$(TargetPlatformIdentifier)'. The profiler is already part of the main Sentry package."
6+
Condition="'$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst'" />
7+
</Target>
8+
</Project>

0 commit comments

Comments
 (0)