-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from jnm2/fix_ref_package_path
Fix missing annotations when using Microsoft.NETCore.App.Ref 3.1.0
- Loading branch information
Showing
5 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.Collections.Generic; | ||
using System.Data.SqlClient; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace Sample1 | ||
{ | ||
public class Class1 | ||
{ | ||
public static void M(SqlConnection connection, [AllowNull] string? x) | ||
{ | ||
if (!string.IsNullOrEmpty(x)) | ||
{ | ||
x.ToString(); | ||
} | ||
|
||
_ = EqualityComparer<string?>.Default.GetHashCode(x); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net35;net48;netstandard1.6;netstandard2.0;netstandard2.1;netcoreapp1.0;netcoreapp1.1;netcoreapp2.0;netcoreapp2.1;netcoreapp3.0;netcoreapp3.1</TargetFrameworks> | ||
<LangVersion>8</LangVersion> | ||
<Nullable>enable</Nullable> | ||
<AnnotatedReferenceAssemblyVersion>3.1.0</AnnotatedReferenceAssemblyVersion> | ||
<NoWarn>RA1000</NoWarn> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<!-- NuGet cannot restore packages for netcoreapp1.0: https://github.com/NuGet/Home/issues/7414 --> | ||
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp1.0' OR '$(TargetFramework)' == 'netcoreapp1.1'"> | ||
<!-- CS1701: Assuming assembly reference "Assembly Name #1" matches "Assembly Name #2", you may need to supply runtime policy --> | ||
<NoWarn>$(NoWarn),CS1701</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!-- https://github.com/dotnet/core-sdk/issues/2022 --> | ||
<PackageReference Condition="'$(TargetFramework)' == 'net35'" Include="jnm2.ReferenceAssemblies.net35" Version="1.0.0" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Condition="'$(TargetFramework)' != 'net35'" Include="System.Data.SqlClient" Version="4.8.0" /> | ||
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.*" PrivateAssets="all" /> | ||
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" /> | ||
</ItemGroup> | ||
|
||
</Project> |