Skip to content

Commit

Permalink
opt-out
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-garcia committed Jan 12, 2024
1 parent 31073b1 commit fac2cd3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
- Added `Sentry` namespace to global usings when `ImplicitUsings` is enabled ([#3043](https://github.com/getsentry/sentry-dotnet/pull/3043))
If you have conflicts, you can opt-out by adding the following to your `csproj`:
```
<ItemGroup>
<Using Remove="Sentry" />
</ItemGroup>
<PropertyGroup>
<SentryImplicitUsings>false</SentryImplicitUsings>
</PropertyGroup>
```

## 4.0.0-beta.8
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/buildTransitive/Sentry.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<ItemGroup Condition="$(Language) == 'C#' and ($(ImplicitUsings) == 'enable' or $(ImplicitUsings) == 'true')">
<ItemGroup Condition="$(Language) == 'C#' and $(SentryImplicitUsings) != 'false' and ($(ImplicitUsings) == 'enable' or $(ImplicitUsings) == 'true')">
<Using Include="Sentry" />
</ItemGroup>

Expand Down
5 changes: 1 addition & 4 deletions test/SingleFileTestApp/SingleFileTestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
<ImplicitUsings>true</ImplicitUsings>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<SentryImplicitUsings>false</SentryImplicitUsings>
</PropertyGroup>

<ItemGroup>
<Using Remove="Sentry" />
</ItemGroup>

<PropertyGroup>
<_OSArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</_OSArchitecture>
<!-- Set the appropriate RuntimeIdentifier. See: https://learn.microsoft.com/en-us/dotnet/core/rid-catalog -->
Expand Down

0 comments on commit fac2cd3

Please sign in to comment.