Only a very few number of projects still built for net45-net46.
This PR trims out these assets from the build which of course
results in them not being packaged (as there is no harvesting
mechanism in the repository present anymore).
Suppressing the package warnings for the intentionally dropped
assets and cleaning up conditions in the project file as well.
For more details please see the reasoning in the linked issue.
Contributes to #53282
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-#if NET46
-using System.Security;
-#endif
#pragma warning disable CA1823 // not all IDs are used by all partial providers
// method that takes an object and optionally provides a string representation of it, in case a particular library wants to customize further.
/// <summary>Provides logging facilities for System.Net libraries.</summary>
-#if NET46
- [SecuritySafeCritical]
-#endif
internal sealed partial class NetEventSource : EventSource
{
/// <summary>The single event source instance to use for all logging.</summary>
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-#if NET46
-using System.Security;
-#endif
#pragma warning disable CA1823 // not all IDs are used by all partial providers
// method that takes an object and optionally provides a string representation of it, in case a particular library wants to customize further.
/// <summary>Provides logging facilities for System.Net libraries.</summary>
-#if NET46
- [SecuritySafeCritical]
-#endif
internal sealed partial class NetEventSource : EventSource
{
#if !ES_BUILD_STANDALONE
{
internal static partial class SR
{
-#if !NET45 // AppContext is not supported on < .NET Framework 4.5
private static readonly bool s_usingResourceKeys = AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
-#endif
// This method is used to decide if we need to append the exception message parameters to the message when calling SR.Format.
// by default it returns the value of System.Resources.UseSystemResourceKeys AppContext switch or false if not specified.
// Native code generators can replace the value this returns based on user input at the time of native code generation.
// The Linker is also capable of replacing the value of this method when the application is being trimmed.
- private static bool UsingResourceKeys() =>
-#if !NET45 // AppContext is not supported on < .NET Framework 4.5
- s_usingResourceKeys;
-#else
- false;
-#endif
+ private static bool UsingResourceKeys() => s_usingResourceKeys;
internal static string GetResourceString(string resourceKey)
{
<PropertyGroup>
<!-- Build all .NET Framework configurations when net48 is passed in. This is for convenience. -->
- <AdditionalBuildTargetFrameworks Condition="'$(BuildTargetFramework)' == 'net48'">net45;net451;net452;net46;net461;net462;net47;net471;net472</AdditionalBuildTargetFrameworks>
+ <AdditionalBuildTargetFrameworks Condition="'$(BuildTargetFramework)' == 'net48'">net461;net462;net47;net471;net472</AdditionalBuildTargetFrameworks>
<AdditionalBuildTargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true' and '$(BuildAllProjects)' == 'true'">$(AdditionalBuildTargetFrameworks);netstandard2.0</AdditionalBuildTargetFrameworks>
</PropertyGroup>
<ProjectReference Include="..\ref\System.ComponentModel.Composition.Registration.csproj">
<SupportedFramework>netcoreapp3.0;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
- <SupportedFramework Include="net45" Version="4.0.0.0" />
+ <SupportedFramework Include="net461" Version="4.0.0.0" />
<ProjectReference Include="..\src\System.ComponentModel.Composition.Registration.csproj" />
- <InboxOnTargetFramework Include="net45">
+ <InboxOnTargetFramework Include="net461">
<AsFrameworkReference>true</AsFrameworkReference>
</InboxOnTargetFramework>
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\ref\System.ComponentModel.Composition.csproj">
- <SupportedFramework>uap10.0.16299;netcoreapp2.0;net45;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>uap10.0.16299;netcoreapp2.0;net461;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.ComponentModel.Composition.csproj" />
- <InboxOnTargetFramework Include="net45">
+ <InboxOnTargetFramework Include="net461">
<AsFrameworkReference>true</AsFrameworkReference>
</InboxOnTargetFramework>
<InboxOnTargetFramework Include="uap10.0.16299" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\src\System.Diagnostics.DiagnosticSource.csproj">
- <SupportedFramework>net45;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<!-- Since UAP and .NETCoreApp are package based we still want to enable
</ValidatePackageSuppression>
<!-- Exclude TFMs that aren't supported by the package anymore from validation. -->
- <ExcludeHarvestedSupportedFramework Include="netcoreapp1.0;netcoreapp1.1;netcore45;netcore451;netcore50;uap10.0;wp8;wpa81" />
+ <ExcludeHarvestedSupportedFramework Include="netcoreapp1.0;netcoreapp1.1;netcore45;netcore451;netcore50;uap10.0;wp8;wpa81;net45;net451;net46" />
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
+ <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<CLSCompliant>false</CLSCompliant>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <DefineConstants Condition="'$(TargetFramework)' == 'net45'">$(DefineConstants);ALLOW_PARTIALLY_TRUSTED_CALLERS</DefineConstants>
+ <DefineConstants Condition="'$(TargetFramework)' == 'net461'">$(DefineConstants);ALLOW_PARTIALLY_TRUSTED_CALLERS</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Diagnostics.DiagnosticSource.cs" />
<ItemGroup>
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)' == 'net45'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<Reference Include="System.Runtime" />
</ItemGroup>
</Project>
\ No newline at end of file
<CLSCompliant>false</CLSCompliant>
<NoWarn>$(NoWarn);SA1205</NoWarn>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent);net5.0;netstandard2.0;net46;net45</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);net5.0;netstandard2.0;net461</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <DefineConstants Condition="'$(TargetFramework)' == 'net45'">$(DefineConstants);NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT;NO_ARRAY_EMPTY_SUPPORT</DefineConstants>
<DefineConstants Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">$(DefineConstants);ALLOW_PARTIALLY_TRUSTED_CALLERS;ENABLE_HTTP_HANDLER</DefineConstants>
<DefineConstants Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETCoreApp'">$(DefineConstants);W3C_DEFAULT_ID_FORMAT</DefineConstants>
</PropertyGroup>
<Compile Include="System\Diagnostics\Metrics\Histogram.cs" />
<Compile Include="System\Diagnostics\Metrics\Instrument.cs" />
<Compile Include="System\Diagnostics\Metrics\Instrument.common.cs" />
- <Compile Include="System\Diagnostics\Metrics\Instrument.netcore.cs" Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)' Or '$(TargetFramework)' == 'net5.0'" />
- <Compile Include="System\Diagnostics\Metrics\Instrument.netfx.cs" Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)' And '$(TargetFramework)' != 'net5.0'" />
+ <Compile Include="System\Diagnostics\Metrics\Instrument.netcore.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
+ <Compile Include="System\Diagnostics\Metrics\Instrument.netfx.cs" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
<Compile Include="System\Diagnostics\Metrics\Measurement.cs" />
<Compile Include="System\Diagnostics\Metrics\Meter.cs" />
<Compile Include="System\Diagnostics\Metrics\MeterListener.cs" />
<Link>Common\System\LocalAppContextSwitches.Common.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)' != 'net45'">
+ <ItemGroup>
<Compile Include="System\Diagnostics\Activity.Current.net46.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)' == 'net45'">
- <Compile Include="System\Diagnostics\Activity.Current.net45.cs" />
- </ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' or
'$(TargetFramework)' == 'netstandard2.0'">
<Compile Include="System\Diagnostics\Activity.DateTime.corefx.cs" />
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Runtime.Remoting;
-using System.Runtime.Remoting.Messaging;
-using System.Security;
-
-namespace System.Diagnostics
-{
- public partial class Activity
- {
- /// <summary>
- /// Gets or sets the current operation (Activity) for the current thread. This flows
- /// across async calls.
- /// </summary>
- public static Activity Current
- {
-#if ALLOW_PARTIALLY_TRUSTED_CALLERS
- [System.Security.SecuritySafeCriticalAttribute]
-#endif
- get
- {
- ObjectHandle activityHandle = (ObjectHandle)CallContext.LogicalGetData(FieldKey);
-
- // Unwrap the Activity if it was set in the same AppDomain (as FieldKey is AppDomain-specific).
- if (activityHandle != null)
- {
- return (Activity)activityHandle.Unwrap();
- }
- return null;
- }
-
-#if ALLOW_PARTIALLY_TRUSTED_CALLERS
- [System.Security.SecuritySafeCriticalAttribute]
-#endif
- set
- {
- if (ValidateSetCurrent(value))
- {
- SetCurrent(value);
- }
- }
- }
-
-#region private
-
-#if ALLOW_PARTIALLY_TRUSTED_CALLERS
- [System.Security.SecuritySafeCriticalAttribute]
-#endif
- private static void SetCurrent(Activity activity)
- {
- // Applications may implicitly or explicitly call other AppDomains
- // that do not have DiagnosticSource DLL, therefore may not be able to resolve Activity type stored in the logical call context.
- // To avoid it, we wrap Activity with ObjectHandle.
- CallContext.LogicalSetData(FieldKey, new ObjectHandle(activity));
- }
-
- // Slot name depends on the AppDomain Id in order to prevent AppDomains to use the same Activity
- // Cross AppDomain calls are considered as 'external' i.e. only Activity Id and Baggage should be propagated and
- // new Activity should be started for the RPC calls (incoming and outgoing)
- private static readonly string FieldKey = $"{typeof(Activity).FullName}_{AppDomain.CurrentDomain.Id}";
-#endregion //private
- }
-}
WriteEvent(1, Message);
}
-#if !NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT
/// <summary>
/// Events from DiagnosticSource can be forwarded to EventSource using this event.
/// </summary>
{
WriteEvent(2, SourceName, EventName, Arguments);
}
-#endif
+
/// <summary>
/// This is only used on V4.5 systems that don't have the ability to log KeyValuePairs directly.
/// It will eventually go away, but we should always reserve the ID for this.
WriteEvent(3, SourceName, EventName, ArgmentsJson);
}
-#if !NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT
/// <summary>
/// Used to mark the beginning of an activity
/// </summary>
{
WriteEvent(9, SourceName, EventName, Arguments);
}
-#endif
/// <summary>
/// Fires when a new DiagnosticSource becomes available.
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
Justification = "Arguments parameter is trimmer safe")]
#endif
-#if NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT
- [Event(11, Keywords = Keywords.Events)]
-#else
[Event(11, Keywords = Keywords.Events, ActivityOptions = EventActivityOptions.Recursive)]
-#endif
private void ActivityStart(string SourceName, string ActivityName, IEnumerable<KeyValuePair<string, string?>> Arguments) =>
WriteEvent(11, SourceName, ActivityName, Arguments);
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
Justification = "Arguments parameter is trimmer safe")]
#endif
-#if NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT
- [Event(12, Keywords = Keywords.Events)]
-#else
[Event(12, Keywords = Keywords.Events, ActivityOptions = EventActivityOptions.Recursive)]
-#endif
private void ActivityStop(string SourceName, string ActivityName, IEnumerable<KeyValuePair<string, string?>> Arguments) =>
WriteEvent(12, SourceName, ActivityName, Arguments);
#region private
-#if NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT
- /// <summary>
- /// Converts a keyvalue bag to JSON. Only used on V4.5 EventSources.
- /// </summary>
- private static string ToJson(IEnumerable<KeyValuePair<string, string>> keyValues)
- {
- StringBuilder sb = new StringBuilder();
- sb.AppendLine("{");
- bool first = true;
- foreach (var keyValue in keyValues)
- {
- if (!first)
- sb.Append(',').AppendLine();
- first = false;
-
- sb.Append('"').Append(keyValue.Key).Append("\":\"");
-
- // Write out the value characters, escaping things as needed.
- foreach (var c in keyValue.Value)
- {
- if (char.IsControl(c))
- {
- if (c == '\n')
- sb.Append("\\n");
- else if (c == '\r')
- sb.Append("\\r");
- else
- sb.Append("\\u").Append(((int)c).ToString("x").PadLeft(4, '0'));
- }
- else
- {
- if (c == '"' || c == '\\')
- sb.Append('\\');
- sb.Append(c);
- }
- }
- sb.Append('"'); // Close the string.
- }
- sb.AppendLine().AppendLine("}");
- return sb.ToString();
- }
-#endif
-
private DiagnosticSourceEventSource()
-#if !NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT
// This constructor uses EventSourceSettings which is only available on V4.6 and above
// Use the EventSourceSettings to turn on support for complex types, if available (v4.6 and above).
: base(EventSourceSettings.EtwSelfDescribingEventFormat)
-#endif
{
}
Action<string, string, IEnumerable<KeyValuePair<string, string?>>>? writeEvent = null;
if (activityName != null && activityName.Contains("Activity"))
{
-#if !NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT
writeEvent = activityName switch
{
nameof(Activity1Start) => _eventSource.Activity1Start,
nameof(RecursiveActivity1Stop) => _eventSource.RecursiveActivity1Stop,
_ => null
};
-#endif
if (writeEvent == null)
_eventSource.Message("DiagnosticSource: Could not find Event to log Activity " + activityName);
if (writeEvent == null)
{
-#if !NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT
writeEvent = _eventSource.Event;
-#else
- writeEvent = delegate (string sourceName, string eventName, IEnumerable<KeyValuePair<string, string>> arguments)
- {
- _eventSource.EventJson(sourceName, eventName, ToJson(arguments));
- };
-#endif
}
// Set up a subscription that watches for the given Diagnostic Sources and events which will call back
#endif
public abstract class Instrument
{
-#if NO_ARRAY_EMPTY_SUPPORT
- internal static KeyValuePair<string, object?>[] EmptyTags { get; } = new KeyValuePair<string, object?>[0];
-#else
internal static KeyValuePair<string, object?>[] EmptyTags { get; } = Array.Empty<KeyValuePair<string, object?>>();
-#endif // NO_ARRAY_EMPTY_SUPPORT
// The SyncObject is used to synchronize the following operations:
// - Instrument.Publish()
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\ref\System.DirectoryServices.AccountManagement.csproj">
- <SupportedFramework>uap10.0.16299;netcoreapp2.0;net45;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>uap10.0.16299;netcoreapp2.0;net461;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.DirectoryServices.AccountManagement.csproj" />
- <InboxOnTargetFramework Include="net45">
+ <InboxOnTargetFramework Include="net461">
<AsFrameworkReference>true</AsFrameworkReference>
</InboxOnTargetFramework>
<File Include="$(PlaceHolderFile)">
- <TargetPath>runtimes/win/lib/net45</TargetPath>
+ <TargetPath>runtimes/win/lib/net461</TargetPath>
</File>
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\ref\System.DirectoryServices.Protocols.csproj">
- <SupportedFramework>uap10.0.16299;netcoreapp2.0;net45;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>uap10.0.16299;netcoreapp2.0;net461;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.DirectoryServices.Protocols.csproj" />
- <InboxOnTargetFramework Include="net45">
+ <InboxOnTargetFramework Include="net461">
<AsFrameworkReference>true</AsFrameworkReference>
</InboxOnTargetFramework>
<File Include="$(PlaceHolderFile)">
- <TargetPath>runtimes/win/lib/net45</TargetPath>
+ <TargetPath>runtimes/win/lib/net461</TargetPath>
</File>
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\ref\System.DirectoryServices.csproj">
- <SupportedFramework>uap10.0.16299;netcoreapp2.0;net45;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>uap10.0.16299;netcoreapp2.0;net461;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.DirectoryServices.csproj" />
- <InboxOnTargetFramework Include="net45">
+ <InboxOnTargetFramework Include="net461">
<AsFrameworkReference>true</AsFrameworkReference>
</InboxOnTargetFramework>
<File Include="$(PlaceHolderFile)">
- <TargetPath>runtimes/win/lib/net45</TargetPath>
+ <TargetPath>runtimes/win/lib/net461</TargetPath>
</File>
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\ref\System.IO.Packaging.csproj">
- <SupportedFramework>net46;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.IO.Packaging.csproj" />
<!-- Exclude TFMs that aren't supported by the package anymore from validation. -->
- <ExcludeHarvestedSupportedFramework Include="netcoreapp1.0;netcoreapp1.1;netcore50;uap10.0" />
+ <ExcludeHarvestedSupportedFramework Include="netcoreapp1.0;netcoreapp1.1;netcore50;uap10.0;net46" />
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
+ <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Compile Include="System.IO.Packaging.Serialization.cs" />
<Compile Include="System.IO.Packaging.PackUriScheme.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)' == 'net46'">
- <Compile Include="System.IO.Packaging.net46.cs" />
+ <ItemGroup Condition="'$(TargetFramework)' == 'net461'">
+ <Compile Include="System.IO.Packaging.net461.cs" />
<Reference Include="WindowsBase" />
</ItemGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
+ <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <IsPartialFacadeAssembly Condition="'$(TargetFramework)' == 'net46'">true</IsPartialFacadeAssembly>
+ <IsPartialFacadeAssembly Condition="'$(TargetFramework)' == 'net461'">true</IsPartialFacadeAssembly>
</PropertyGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<Compile Include="System\IO\Packaging\CompressionOption.cs" />
<Compile Include="System\IO\Packaging\ZipWrappingStream.cs" />
<Compile Include="System\IO\Packaging\PackUriHelper.PackUriScheme.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)' == 'net46'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<Reference Include="WindowsBase" />
</ItemGroup>
</Project>
\ No newline at end of file
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\ref\System.Management.csproj">
- <SupportedFramework>uap10.0.16299;netcoreapp2.0;net45;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>uap10.0.16299;netcoreapp2.0;net461;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.Management.csproj" />
- <InboxOnTargetFramework Include="net45">
+ <InboxOnTargetFramework Include="net461">
<AsFrameworkReference>true</AsFrameworkReference>
</InboxOnTargetFramework>
<File Include="$(PlaceHolderFile)">
- <TargetPath>runtimes/win/lib/net45</TargetPath>
+ <TargetPath>runtimes/win/lib/net461</TargetPath>
</File>
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\ref\System.Reflection.Context.csproj">
- <SupportedFramework>uap10.0.16299;netcoreapp2.0;net45;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>uap10.0.16299;netcoreapp2.0;net461;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.Reflection.Context.csproj" />
- <InboxOnTargetFramework Include="net45">
+ <InboxOnTargetFramework Include="net461">
<AsFrameworkReference>true</AsFrameworkReference>
</InboxOnTargetFramework>
<!-- Since UAP are package based we still want to enable
</ValidatePackageSuppression>
<!-- Exclude TFMs that aren't supported by the package anymore from validation. -->
- <ExcludeHarvestedSupportedFramework Include="netcoreapp1.0;netcoreapp1.1;netcore45;netcore451;netcore50;uap10.0;wpa81" />
+ <ExcludeHarvestedSupportedFramework Include="netcoreapp1.0;netcoreapp1.1;netcore45;netcore451;netcore50;uap10.0;wpa81;net45;net451;net46" />
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\ref\System.Runtime.Caching.csproj">
- <SupportedFramework>uap10.0.16299;netcoreapp2.0;net45;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>uap10.0.16299;netcoreapp2.0;net461;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.Runtime.Caching.csproj" />
- <InboxOnTargetFramework Include="net45">
+ <InboxOnTargetFramework Include="net461">
<AsFrameworkReference>true</AsFrameworkReference>
</InboxOnTargetFramework>
<InboxOnTargetFramework Include="$(AllXamarinFrameworks)" />
<File Include="$(PlaceHolderFile)">
- <TargetPath>runtimes/win/lib/net45</TargetPath>
+ <TargetPath>runtimes/win/lib/net461</TargetPath>
</File>
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
<ItemGroup>
<PackageIndex Include="$(PkgDir)baseline\packageBaseline.1.1.json" />
<ProjectReference Include="..\ref\System.Runtime.CompilerServices.Unsafe.csproj">
- <SupportedFramework>net45;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
</ValidatePackageSuppression>
<!-- Exclude TFMs that aren't supported by the package anymore from validation. -->
- <ExcludeHarvestedSupportedFramework Include="netcoreapp1.0;netcoreapp1.1;netcore45;netcore451;netcore50;uap10.0;wp8;wpa81" />
+ <ExcludeHarvestedSupportedFramework Include="netcoreapp1.0;netcoreapp1.1;netcore45;netcore451;netcore50;uap10.0;wp8;wpa81;net45;net451;net46" />
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
</Project>
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLSCompliant>false</CLSCompliant>
<Nullable>enable</Nullable>
- <TargetFrameworks>netstandard2.1;netstandard2.0;net461;net45</TargetFrameworks>
- <ExcludeFromPackage Condition="'$(TargetFramework)' == 'net45'">true</ExcludeFromPackage>
+ <TargetFrameworks>netstandard2.1;netstandard2.0;net461</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.CompilerServices.Unsafe.cs" />
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;netcoreapp2.0;net45</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;netcoreapp2.0;net461</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<!-- Make sure that the DebuggableAttribute is set properly. -->
<DebugOptimization>IMPL</DebugOptimization>
<CoreAssembly>System.Runtime</CoreAssembly>
<CoreAssembly Condition="'$(TargetFramework)' == 'netstandard2.0'">netstandard</CoreAssembly>
</PropertyGroup>
- <PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
+ <PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
<CoreAssembly>mscorlib</CoreAssembly>
- <ExtraMacros>#define net45</ExtraMacros>
+ <ExtraMacros>#define $(TargetFramework)</ExtraMacros>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.CompilerServices.Unsafe.il" />
<ItemGroup>
<!-- mscorlib is passed in as an explicit reference from C# targets but not via the IL SDK. -->
<Reference Include="$(CoreAssembly)"
- Condition="!$(TargetFramework.StartsWith('netstandard'))" />
+ Condition="'$(TargetFramework)' != 'netstandard2.0'" />
</ItemGroup>
<Target Name="GenerateVersionFile"
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\ref\System.Speech.csproj">
- <SupportedFramework>netcoreapp2.0;net45;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>netcoreapp2.0;net461;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.Speech.csproj" />
- <InboxOnTargetFramework Include="net45">
+ <InboxOnTargetFramework Include="net461">
<AsFrameworkReference>true</AsFrameworkReference>
</InboxOnTargetFramework>
<NETStandardCompatError Include="netcoreapp2.0" Supported="netcoreapp3.1" />