diff options
author | Anirudh Agnihotry <anirudhagnihotry098@gmail.com> | 2018-07-06 18:47:46 -0700 |
---|---|---|
committer | Dan Moseley <danmose@microsoft.com> | 2018-07-06 18:47:46 -0700 |
commit | 2dd9ba545f9bca84bae2d1181d6327f4e8d470a7 (patch) | |
tree | c2465d847f50b9b90cc39d109c0c8add5bfcd856 | |
parent | e650d42d14f0b701fbbe7fb8f4eb05616c0cf53d (diff) | |
download | coreclr-2dd9ba545f9bca84bae2d1181d6327f4e8d470a7.tar.gz coreclr-2dd9ba545f9bca84bae2d1181d6327f4e8d470a7.tar.bz2 coreclr-2dd9ba545f9bca84bae2d1181d6327f4e8d470a7.zip |
TargetFrameworkName property initialized (#18814)
-rw-r--r-- | src/System.Private.CoreLib/src/System/AppDomainSetup.cs | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/src/System.Private.CoreLib/src/System/AppDomainSetup.cs b/src/System.Private.CoreLib/src/System/AppDomainSetup.cs index d22ebf92ca..b89995446d 100644 --- a/src/System.Private.CoreLib/src/System/AppDomainSetup.cs +++ b/src/System.Private.CoreLib/src/System/AppDomainSetup.cs @@ -2,23 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -/*============================================================================= -** -** -** Purpose: Defines the settings that the loader uses to find assemblies in an -** AppDomain -** -** -=============================================================================*/ +using System.Collections.Generic; +using System.Reflection; +using System.Runtime.Versioning; +using System.IO; + namespace System { - using System.Text; - using System.Runtime.InteropServices; - using System.Security; - using Path = System.IO.Path; - using System.Diagnostics; - using System.Collections.Generic; - internal sealed class AppDomainSetup { internal enum LoaderInformation @@ -160,14 +150,9 @@ namespace System } } - // A target Framework moniker, in a format parsible by the FrameworkName class. - public string TargetFrameworkName - { - get - { - return null; - } - } + // The Target framework is not the framework that the process is actually running on. + // It is the value read from the TargetFrameworkAttribute on the .exe that started the process. + public string TargetFrameworkName => Assembly.GetEntryAssembly()?.GetCustomAttribute<TargetFrameworkAttribute>()?.FrameworkName; public string ApplicationName { |