-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NetCoreAppCurrent configuration to libs (Phase 1) #54544
Merged
ViktorHofer
merged 25 commits into
dotnet:main
from
ViktorHofer:NetcoreAppCurrentLibsP1
Jun 29, 2021
Merged
Changes from 19 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
0b0ed72
Use property to indicate NetCoreApp min version
ViktorHofer 8b4a471
Add NetCoreAppCurrent to S.Numerics.Tensors
ViktorHofer e91462f
Add NetCoreAppCurrent to S.T.AccessControl
ViktorHofer 73e70c6
Add NetCoreAppCurrent to System.Memory.Data
ViktorHofer ef78b74
Add NetCoreAppCurrent to S.Composition.* projects
ViktorHofer 39f809c
Add NetCoreAppCurrent to System.IO.Packaging
ViktorHofer 61dd121
Add NetCoreAppCurrent config to System.IO.Ports
ViktorHofer 39d1319
Add NetCoreAppCurrent to System.Data.OleDb
ViktorHofer 03a9157
Add NetCoreAppCurrent to M.W32.Registry.AccessControl
ViktorHofer bb57f13
Add NetCoreAppCurrent to S.Reflection.Context
ViktorHofer 69a5de2
Add NetCoreAppCurrent to S.C.Composition.Registration
ViktorHofer bf78da8
Add NetCoreAppCurrent to S.Resources.Extensions
ViktorHofer b6ca563
Add NetCoreAppCurrent to S.N.H.WinHttpHandler
ViktorHofer efbaa66
Mark CodeBase with RequireAssemblyFiles
ViktorHofer c01683e
Apply serialPort feedback
ViktorHofer 88b6536
Apply SerialStream feedback
ViktorHofer 9e11a15
Avoid ifdefs
ViktorHofer 19ba381
Fix trailing whitespace lol
ViktorHofer ac39e76
Fix NoWarn
ViktorHofer 2a31394
Remove further ifdefs
ViktorHofer 93fe112
Add pragma warning back
ViktorHofer 46f9562
Suppress CA1845
ViktorHofer 20834c0
Fix unnecessary empty line changes
ViktorHofer 89f8589
Revert SerialStream changes
ViktorHofer 5123778
Disable SerialStream warning for memory overloads
ViktorHofer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
11 changes: 10 additions & 1 deletion
11
.../Microsoft.Win32.Registry.AccessControl/ref/Microsoft.Win32.Registry.AccessControl.csproj
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 |
---|---|---|
@@ -1,14 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks> | ||
<TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461</TargetFrameworks> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="Microsoft.Win32.Registry.AccessControl.cs" /> | ||
<Compile Include="Microsoft.Win32.Registry.AccessControl.Forwards.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'"> | ||
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Win32.Registry\ref\Microsoft.Win32.Registry.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" /> | ||
<PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" /> | ||
<!-- Manually reference the transitive dependency to make NuGet pick the package over the transitive project. --> | ||
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" /> | ||
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" /> | ||
</ItemGroup> | ||
</Project> |
13 changes: 11 additions & 2 deletions
13
.../Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj
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
8 changes: 5 additions & 3 deletions
8
...tModel.Composition.Registration/ref/System.ComponentModel.Composition.Registration.csproj
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.1</TargetFrameworks> | ||
<TargetFrameworks>$(NetCoreAppCurrent);netstandard2.1</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="System.ComponentModel.Composition.Registration.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\System.ComponentModel.Composition\ref\System.ComponentModel.Composition.csproj" /> | ||
<ProjectReference Include="..\..\System.Reflection.Context\ref\System.Reflection.Context.csproj" /> | ||
<ProjectReference Include="$(LibrariesProjectRoot)System.ComponentModel.Composition\ref\System.ComponentModel.Composition.csproj" /> | ||
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Context\ref\System.Reflection.Context.csproj" /> | ||
</ItemGroup> | ||
</Project> |
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
1 change: 1 addition & 0 deletions
1
...omposition.Registration/tests/System.ComponentModel.Composition.Registration.Tests.csproj
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to default
NETStandardCompatError/@Supported
to$(NetCoreAppMinimum)
so that we don't need to duplicate that in all the projects?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know why I am here. But I love you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though we mostly care about .NETCoreApp, as .NETStandard has multiple compatible frameworks, I wouldn't want to default it to .NETCoreApp. As an example, for NET7 the min .NETFramework version will be net462 and we will make use of this infrastructure for .NETFramework as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defaulting could happen in Targets after the project sets the Include value. You could handle both cases based on TFI of the include. It's just a suggestion, but could avoid boilerplate if we think the boilerplate isn't adding value to the project. I guess from that perspective we could automatically calculate these entirely since we see what the project is targeting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. Tbh that's what I would prefer. When I added this infrastructure in a previous PR I considered automation but didn't do it for different reasons. That said, I definitely wouldn't want to clean this up as part of this PR. For now I'm fine with having these items in the project file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, also fine with it for now. Just had this gut-reaction when I saw this being treated like boilerplate. If we do end up keeping it in the project file then we should add it to the docs: https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/libraries-packaging.md