Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Adding net461 target to Microsoft.Bcl.* packages#38104

Merged
joperezr merged 2 commits intodotnet:masterfrom
joperezr:AddNet461Target
May 31, 2019
Merged

Adding net461 target to Microsoft.Bcl.* packages#38104
joperezr merged 2 commits intodotnet:masterfrom
joperezr:AddNet461Target

Conversation

@joperezr
Copy link
Copy Markdown
Member

Fixes #37929

cc: @onovotny @stephentoub

@ahsonkhan I'll try to add Json package to this PR as well, but I do want to be able to get this in for the next preview, so I will add that separate in case I see that I am running out of time.

@joperezr
Copy link
Copy Markdown
Member Author

@dotnet/dncenghot Looks like CI is broken, error says

/.azure-ci.yml: Could not find /eng/pipelines/linux.yml in repository self hosted on https://api.github.com using commit c204564c2bcb8f9f4e113f8e2506557860c79ee8. GitHub reported the error, "Not Found"

I checked and eng/pipelines/linux.yml does still exist, so is this a known issue?

@joperezr joperezr closed this May 31, 2019
@joperezr joperezr reopened this May 31, 2019
@joperezr joperezr closed this May 31, 2019
@joperezr joperezr reopened this May 31, 2019
@ghost
Copy link
Copy Markdown

ghost commented May 31, 2019

@joperezr Yeah, this is a known issue between GitHub and Azure DevOps. For now retrying is the only recourse. See https://github.com/dotnet/core-eng/issues/6579

@joperezr joperezr closed this May 31, 2019
@joperezr joperezr reopened this May 31, 2019
@joperezr joperezr closed this May 31, 2019
@joperezr joperezr reopened this May 31, 2019
@joperezr
Copy link
Copy Markdown
Member Author

CI is pretty busted right now, but we managed to run the CI again with my latest changes, here is the link of the build: https://dev.azure.com/dnceng/public/_build/results?buildId=207266 Once it is green I'll go ahead and merge this.

@joperezr
Copy link
Copy Markdown
Member Author

CI is green, so I'll go ahead and merge.

@joperezr joperezr merged commit fdab38c into dotnet:master May 31, 2019
@joperezr joperezr deleted the AddNet461Target branch May 31, 2019 18:43
Copy link
Copy Markdown

@ahsonkhan ahsonkhan left a comment

Choose a reason for hiding this comment

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

Some questions.

<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.ValueTuple" />
<Reference Include="System.Numerics.Vectors" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why did we end up needing these additional references? Should they be in a separate condition block where only TargetsNetFx is true?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We can separate them out if you prefer, but this itemgroup was already applying for netstandard build and netfx. When in netstandard, these extra references will not do any harm as they are only facades in netstandard and don't have any typedefs, so the resulting assembly will be exactly the same. I wanted to keep the netstandard and netfx configurations as joint as possible when adding the extra configuration, which is why I didn't bother to add the extra itemgroup. That said, we can change this if you prefer.

</ProjectReference>
<ProjectReference Include="..\src\System.Text.Json.csproj" />
<ProjectReference Include="..\src\System.Text.Json.csproj">
<SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you explain why we need to add the src project?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The source project was already there, all we did here was adding the Supported frameworks clause to the source project. I did it because this project will not have the ref asset in the package because of the following property:

<PropertyGroup>
<!-- Excluding the reference assets on the package so that RAR will see the run-time conflicts at build time in order to
generate the right binding redirects when targeting Desktop. https://github.com/dotnet/corefx/issues/32457 -->
<ExcludeReferenceAssets>true</ExcludeReferenceAssets>
</PropertyGroup>

Since we have that, we do still want to make sure that we do validation even when only the src project is the one includded in the package, hence I added the supported clause to the source project.

@karelz karelz added this to the 3.0 milestone Jul 16, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Adding net461 target to Microsoft.Bcl.* packages

* Adding System.Text.Json net461 target as well


Commit migrated from dotnet/corefx@fdab38c
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add .NET 4.6.1 target to AsyncInterfaces

4 participants