Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/System.Text.Encodings.Web/src/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
<PackageConfigurations>
netcoreapp3.0;
Copy link
Copy Markdown
Author

@ahsonkhan ahsonkhan Oct 24, 2019

Choose a reason for hiding this comment

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

Some of the references that S.T.E.W depends on don't have a config for netcoreapp3.0.
System.Diagnostics.Debug
System.Memory
System.Runtime
etc.

Should we also add the versioned TFM configs to all those (along side the version-less ones) or do we need to add package configurations here, instead?

netcoreapp-Unix;
netcoreapp-Windows_NT;

netcoreapp-Windows_NT;
netcoreapp-Unix;

That's causing the CI failures:

##[error].dotnet\sdk\3.0.100\Microsoft.Common.CurrentVersion.targets(2106,5): error MSB3245: Could not resolve this reference. Could not locate the assembly "System.Runtime". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

build -allconfigurations succeeds but targeting individual frameworks (particularly the default - netcoreapp) fails.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This library is inbox as well so you will need a version-less build configuration but you will need to exclude it from the packages configuration so that it targets the latest.

So you do something like:

<PackageConfigurations>
  netcoreapp3.0;
  netstandard2.1;
  netstandard;
</PackageConfigurations>
<BuildConfigurations>
  $(PackageConfigurations);
  netcoreapp;
</BuildConfigurations>

Copy link
Copy Markdown
Author

@ahsonkhan ahsonkhan Oct 24, 2019

Choose a reason for hiding this comment

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

So you do something like

Thanks for the suggestion, @safern. That's precisely what I tried next, following precedence of other similar packages like Threading.Channels:

<PropertyGroup>
<PackageConfigurations>
netstandard1.3;
netstandard;
netcoreapp3.0;
</PackageConfigurations>
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
</BuildConfigurations>
</PropertyGroup>

The netcoreapp3.0 package config still causes the failure though. I don't know if its because of contention caused by netstandard2.1 and netcoreapp3.0.

Let me retry that to verify.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Awesome, that worked! I wasn't updating the Configurations property in the csproj locally to include netcoreapp which is why I was seeing the failure earlier.

netstandard2.1;
netstandard;
</PackageConfigurations>
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<RootNamespace>System.Text.Encodings.Web</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Text\Encodings\Web\DefaultJavaScriptEncoder.cs" />
Expand Down