Recently, Microsoft Corportation has released a new look for .NET Reference Source. And you may find it here, http://referencesource.microsoft.com/. As you download the full code provided by http://referencesource.microsoft.com/DotNetReferenceSource.zip, you may notice these tips as follows:
"Download the entire source code as a .zip file. The archive includes a solution and project files that can be opened in Visual Studio. This solution will not build because it is missing crucial components such as resources, XAML files, etc. but it will be sufficient to browse the source code inside Visual Studio." As metioned above, "This solution will not build because it is mising crucial components such as resources, XAML files, etc.", I decided to try to build mscorlib.dll with visual studio based on this project. The build environment is Windows 7 and Visual Studio  2013, and you may need ILSpy in order to solve problems such as "file missing errors".
 
Firstly, I deleted all the other project such as "ComSvcConfig", "Microsoft.VisualBasic" in ndp.sln. When I have done this, the ndp.sln file is like this :
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30110.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mscorlib", "ndp\clr\src\BCL\mscorlib.csproj", "{A72657BE-225C-4239-956E-EE2A30893B41}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A72657BE-225C-4239-956E-EE2A30893B41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A72657BE-225C-4239-956E-EE2A30893B41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A72657BE-225C-4239-956E-EE2A30893B41}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A72657BE-225C-4239-956E-EE2A30893B41}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Secondly, I need to copy all the files needed in mscorlib project. These files are located in "/ndp/clr/src/BCL/*.*", you need to copy all these files.

 
What's more, if you open the ndp.sln in Visual Studio 2013 and build the solution, you may find some errors such as "Compiler Error Message: CS0234: The type or namespace name 'Runtime' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)". As you open the "/ndp/clr/src/BCL/Microsoft/" folder, you can only find "Win32" subfloder. Well, you need to create a "Runtime" subfloder manually. And under the Runtime floder, you need to create a "Hosting" subfloder as well. As you explore the mscorlib.dll with ILSpy, you may find that there is a namespace name "Microsoft.Runtime.Hosting", and there are three class or interface in the namespace "Microsoft.Runtime.Hosting", IClrStrongName, IClrStrongNameUsingIntPtr and StrongNameHelpers. Now, you need to copy the code in ILSpy and paste them in right order.
 
If you rebuild the project, you will still find some file missing errors. In order to solve these problems, follow these steps :
Step1 : create "\ndp\clr\src\BCL\System\CompatibilityFlag.cs" file and paste the code as follows.
using System;
namespace System
{
internal enum CompatibilityFlag
{
SwallowUnhandledExceptions,
NullReferenceExceptionOnAV,
EagerlyGenerateRandomAsymmKeys,
FullTrustListAssembliesInGac,
DateTimeParseIgnorePunctuation,
OnlyGACDomainNeutral,
DisableReplacementCustomCulture
}
}

Step2 : create "\ndp\clr\src\BCL\System\AppDomainSetup.cs" file and paste the code as follows.

using System;
using System.Collections.Generic;
using System.Deployment.Internal.Isolation.Manifest;
using System.Globalization;
using System.IO;
using System.Runtime;
using System.Runtime.CompilerServices;
using System.Runtime.Hosting;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
using System.Security.Policy;
using System.Security.Util;
using System.Text;
namespace System
{
[ClassInterface(ClassInterfaceType.None), ComVisible(true)]
[Serializable]
public sealed class AppDomainSetup : IAppDomainSetup
{
[Serializable]
internal enum LoaderInformation
{
ApplicationBaseValue,
ConfigurationFileValue,
DynamicBaseValue,
DevPathValue,
ApplicationNameValue,
PrivateBinPathValue,
PrivateBinPathProbeValue,
ShadowCopyDirectoriesValue,
ShadowCopyFilesValue,
CachePathValue,
LicenseFileValue,
DisallowPublisherPolicyValue,
DisallowCodeDownloadValue,
DisallowBindingRedirectsValue,
DisallowAppBaseProbingValue,
ConfigurationBytesValue,
ManifestFilePathValue,
VersioningManifestBaseValue,
LoaderMaximum
}
private string[] _Entries;
private LoaderOptimization _LoaderOptimization;
private string _AppBase;
[OptionalField(VersionAdded = 2)]
private AppDomainInitializer _AppDomainInitializer;
[OptionalField(VersionAdded = 2)]
private string[] _AppDomainInitializerArguments;
[OptionalField(VersionAdded = 2)]
private ActivationArguments _ActivationArguments;
[OptionalField(VersionAdded = 2)]
private string _ApplicationTrust;
[OptionalField(VersionAdded = 2)]
private byte[] _ConfigurationBytes;
[OptionalField(VersionAdded = 3)]
private bool _DisableInterfaceCache;
[OptionalField(VersionAdded = 4)]
private string _AppDomainManagerAssembly;
[OptionalField(VersionAdded = 4)]
private string _AppDomainManagerType;
[OptionalField(VersionAdded = 4)]
private string[] _AptcaVisibleAssemblies;
[OptionalField(VersionAdded = 4)]
private Dictionary<string, object> _CompatFlags;
[OptionalField(VersionAdded = 5)]
private string _TargetFrameworkName;
[NonSerialized]
internal AppDomainSortingSetupInfo _AppDomainSortingSetupInfo;
[OptionalField(VersionAdded = 5)]
private bool _CheckedForTargetFrameworkName;
[OptionalField(VersionAdded = 5)]
private bool _UseRandomizedStringHashing;
internal string[] Value
{
get
{
if (this._Entries == null)
{
this._Entries = new string[18];
}
return this._Entries;
}
}
public string AppDomainManagerAssembly
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this._AppDomainManagerAssembly;
}
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
set
{
this._AppDomainManagerAssembly = value;
}
}
public string AppDomainManagerType
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this._AppDomainManagerType;
}
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
set
{
this._AppDomainManagerType = value;
}
}
public string[] PartialTrustVisibleAssemblies
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this._AptcaVisibleAssemblies;
}
set
{
if (value != null)
{
this._AptcaVisibleAssemblies = (string[])value.Clone();
Array.Sort<string>(this._AptcaVisibleAssemblies, StringComparer.OrdinalIgnoreCase);
return;
}
this._AptcaVisibleAssemblies = null;
}
}
public string ApplicationBase
{
[SecuritySafeCritical]
get
{
return this.VerifyDir(this.GetUnsecureApplicationBase(), false);
}
set
{
this.Value[0] = this.NormalizePath(value, false);
}
}
internal static string ApplicationBaseKey
{
get
{
return "APPBASE";
}
}
public string ConfigurationFile
{
[SecuritySafeCritical]
get
{
return this.VerifyDir(this.Value[1], true);
}
set
{
this.Value[1] = value;
}
}
internal string ConfigurationFileInternal
{
get
{
return this.NormalizePath(this.Value[1], true);
}
}
internal static string ConfigurationFileKey
{
get
{
return "APP_CONFIG_FILE";
}
}
private static string ConfigurationBytesKey
{
get
{
return "APP_CONFIG_BLOB";
}
}
public string TargetFrameworkName
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this._TargetFrameworkName;
}
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
set
{
this._TargetFrameworkName = value;
}
}
internal bool CheckedForTargetFrameworkName
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this._CheckedForTargetFrameworkName;
}
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
set
{
this._CheckedForTargetFrameworkName = value;
}
}
public string DynamicBase
{
[SecuritySafeCritical]
get
{
return this.VerifyDir(this.Value[2], true);
}
[SecuritySafeCritical]
set
{
if (value == null)
{
this.Value[2] = null;
return;
}
if (this.ApplicationName == null)
{
throw new MemberAccessException(Environment.GetResourceString("AppDomain_RequireApplicationName"));
}
StringBuilder stringBuilder = new StringBuilder(this.NormalizePath(value, false));
stringBuilder.Append('\\');
string value2 = ParseNumbers.IntToString(this.ApplicationName.GetHashCode(), 16, 8, '0', 256);
stringBuilder.Append(value2);
this.Value[2] = stringBuilder.ToString();
}
}
internal static string DynamicBaseKey
{
get
{
return "DYNAMIC_BASE";
}
}
public bool DisallowPublisherPolicy
{
get
{
return this.Value[11] != null;
}
set
{
if (value)
{
this.Value[11] = "true";
return;
}
this.Value[11] = null;
}
}
public bool DisallowBindingRedirects
{
get
{
return this.Value[13] != null;
}
set
{
if (value)
{
this.Value[13] = "true";
return;
}
this.Value[13] = null;
}
}
public bool DisallowCodeDownload
{
get
{
return this.Value[12] != null;
}
set
{
if (value)
{
this.Value[12] = "true";
return;
}
this.Value[12] = null;
}
}
public bool DisallowApplicationBaseProbing
{
get
{
return this.Value[14] != null;
}
set
{
if (value)
{
this.Value[14] = "true";
return;
}
this.Value[14] = null;
}
}
internal string DeveloperPath
{
[SecurityCritical]
get
{
string text = this.Value[3];
this.VerifyDirList(text);
return text;
}
set
{
if (value == null)
{
this.Value[3] = null;
return;
}
string[] array = value.Split(new char[]
{
';'
});
int num = array.Length;
StringBuilder stringBuilder = StringBuilderCache.Acquire(16);
bool flag = false;
for (int i = 0; i < num; i++)
{
if (array[i].Length != 0)
{
if (flag)
{
stringBuilder.Append(";");
}
else
{
flag = true;
}
stringBuilder.Append(Path.GetFullPathInternal(array[i]));
}
}
string stringAndRelease = StringBuilderCache.GetStringAndRelease(stringBuilder);
if (stringAndRelease.Length == 0)
{
this.Value[3] = null;
return;
}
this.Value[3] = stringAndRelease;
}
}
internal static string DisallowPublisherPolicyKey
{
get
{
return "DISALLOW_APP";
}
}
internal static string DisallowCodeDownloadKey
{
get
{
return "CODE_DOWNLOAD_DISABLED";
}
}
internal static string DisallowBindingRedirectsKey
{
get
{
return "DISALLOW_APP_REDIRECTS";
}
}
internal static string DeveloperPathKey
{
get
{
return "DEV_PATH";
}
}
internal static string DisallowAppBaseProbingKey
{
get
{
return "DISALLOW_APP_BASE_PROBING";
}
}
public string ApplicationName
{
get
{
return this.Value[4];
}
set
{
this.Value[4] = value;
}
}
internal static string ApplicationNameKey
{
get
{
return "APP_NAME";
}
}
[XmlIgnoreMember]
public AppDomainInitializer AppDomainInitializer
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this._AppDomainInitializer;
}
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
set
{
this._AppDomainInitializer = value;
}
}
public string[] AppDomainInitializerArguments
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this._AppDomainInitializerArguments;
}
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
set
{
this._AppDomainInitializerArguments = value;
}
}
[XmlIgnoreMember]
public ActivationArguments ActivationArguments
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this._ActivationArguments;
}
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
set
{
this._ActivationArguments = value;
}
}
[XmlIgnoreMember]
public ApplicationTrust ApplicationTrust
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this.InternalGetApplicationTrust();
}
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
set
{
this.InternalSetApplicationTrust(value);
}
}
public string PrivateBinPath
{
[SecuritySafeCritical]
get
{
string text = this.Value[5];
this.VerifyDirList(text);
return text;
}
set
{
this.Value[5] = value;
}
}
internal static string PrivateBinPathKey
{
get
{
return "PRIVATE_BINPATH";
}
}
public string PrivateBinPathProbe
{
get
{
return this.Value[6];
}
set
{
this.Value[6] = value;
}
}
internal static string PrivateBinPathProbeKey
{
get
{
return "BINPATH_PROBE_ONLY";
}
}
public string ShadowCopyDirectories
{
[SecuritySafeCritical]
get
{
string text = this.Value[7];
this.VerifyDirList(text);
return text;
}
set
{
this.Value[7] = value;
}
}
internal static string ShadowCopyDirectoriesKey
{
get
{
return "SHADOW_COPY_DIRS";
}
}
public string ShadowCopyFiles
{
get
{
return this.Value[8];
}
set
{
if (value != null && string.Compare(value, "true", StringComparison.OrdinalIgnoreCase) == 0)
{
this.Value[8] = value;
return;
}
this.Value[8] = null;
}
}
internal static string ShadowCopyFilesKey
{
get
{
return "FORCE_CACHE_INSTALL";
}
}
public string CachePath
{
[SecuritySafeCritical]
get
{
return this.VerifyDir(this.Value[9], false);
}
set
{
this.Value[9] = this.NormalizePath(value, false);
}
}
internal static string CachePathKey
{
get
{
return "CACHE_BASE";
}
}
public string LicenseFile
{
[SecuritySafeCritical]
get
{
return this.VerifyDir(this.Value[10], true);
}
set
{
this.Value[10] = value;
}
}
public LoaderOptimization LoaderOptimization
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this._LoaderOptimization;
}
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
set
{
this._LoaderOptimization = value;
}
}
internal static string LoaderOptimizationKey
{
get
{
return "LOADER_OPTIMIZATION";
}
}
internal static string ConfigurationExtension
{
get
{
return ".config";
}
}
internal static string PrivateBinPathEnvironmentVariable
{
get
{
return "RELPATH";
}
}
internal static string RuntimeConfigurationFile
{
get
{
return "config\\machine.config";
}
}
internal static string MachineConfigKey
{
get
{
return "MACHINE_CONFIG";
}
}
internal static string HostBindingKey
{
get
{
return "HOST_CONFIG";
}
}
public bool SandboxInterop
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get
{
return this._DisableInterfaceCache;
}
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
set
{
this._DisableInterfaceCache = value;
}
}
[SecuritySafeCritical]
internal AppDomainSetup(AppDomainSetup copy, bool copyDomainBoundData)
{
string[] value = this.Value;
if (copy != null)
{
string[] value2 = copy.Value;
int num = this._Entries.Length;
int num2 = value2.Length;
int num3 = (num2 < num) ? num2 : num;
for (int i = 0; i < num3; i++)
{
value[i] = value2[i];
}
if (num3 < num)
{
for (int j = num3; j < num; j++)
{
value[j] = null;
}
}
this._LoaderOptimization = copy._LoaderOptimization;
this._AppDomainInitializerArguments = copy.AppDomainInitializerArguments;
this._ActivationArguments = copy.ActivationArguments;
this._ApplicationTrust = copy._ApplicationTrust;
if (copyDomainBoundData)
{
this._AppDomainInitializer = copy.AppDomainInitializer;
}
else
{
this._AppDomainInitializer = null;
}
this._ConfigurationBytes = copy.GetConfigurationBytes();
this._DisableInterfaceCache = copy._DisableInterfaceCache;
this._AppDomainManagerAssembly = copy.AppDomainManagerAssembly;
this._AppDomainManagerType = copy.AppDomainManagerType;
this._AptcaVisibleAssemblies = copy.PartialTrustVisibleAssemblies;
if (copy._CompatFlags != null)
{
this.SetCompatibilitySwitches(copy._CompatFlags.Keys);
}
if (copy._AppDomainSortingSetupInfo != null)
{
this._AppDomainSortingSetupInfo = new AppDomainSortingSetupInfo(copy._AppDomainSortingSetupInfo);
}
this._TargetFrameworkName = copy._TargetFrameworkName;
this._UseRandomizedStringHashing = copy._UseRandomizedStringHashing;
return;
}
this._LoaderOptimization = LoaderOptimization.NotSpecified;
}
public AppDomainSetup()
{
this._LoaderOptimization = LoaderOptimization.NotSpecified;
}
public AppDomainSetup(ActivationContext activationContext)
: this(new ActivationArguments(activationContext))
{
}
[SecuritySafeCritical]
public AppDomainSetup(ActivationArguments activationArguments)
{
if (activationArguments == null)
{
throw new ArgumentNullException("activationArguments");
}
this._LoaderOptimization = LoaderOptimization.NotSpecified;
this.ActivationArguments = activationArguments;
string entryPointFullPath = CmsUtils.GetEntryPointFullPath(activationArguments);
if (!string.IsNullOrEmpty(entryPointFullPath))
{
this.SetupDefaults(entryPointFullPath, false);
return;
}
this.ApplicationBase = activationArguments.ActivationContext.ApplicationDirectory;
}
internal void SetupDefaults(string imageLocation, bool imageLocationAlreadyNormalized = false)
{
char[] anyOf = new char[]
{
'\\',
'/'
};
int num = imageLocation.LastIndexOfAny(anyOf);
if (num == -1)
{
this.ApplicationName = imageLocation;
}
else
{
this.ApplicationName = imageLocation.Substring(num + 1);
string text = imageLocation.Substring(0, num + 1);
if (imageLocationAlreadyNormalized)
{
this.Value[0] = text;
}
else
{
this.ApplicationBase = text;
}
}
this.ConfigurationFile = this.ApplicationName + AppDomainSetup.ConfigurationExtension;
}
internal string GetUnsecureApplicationBase()
{
return this.Value[0];
}
public byte[] GetConfigurationBytes()
{
if (this._ConfigurationBytes == null)
{
return null;
}
return (byte[])this._ConfigurationBytes.Clone();
}
public void SetConfigurationBytes(byte[] value)
{
this._ConfigurationBytes = value;
}
internal Dictionary<string, object> GetCompatibilityFlags()
{
return this._CompatFlags;
}
public void SetCompatibilitySwitches(IEnumerable<string> switches)
{
if (this._AppDomainSortingSetupInfo != null)
{
this._AppDomainSortingSetupInfo._useV2LegacySorting = false;
this._AppDomainSortingSetupInfo._useV4LegacySorting = false;
}
this._UseRandomizedStringHashing = false;
if (switches != null)
{
this._CompatFlags = new Dictionary<string, object>();
using (IEnumerator<string> enumerator = switches.GetEnumerator())
{
while (enumerator.MoveNext())
{
string current = enumerator.Current;
if (StringComparer.OrdinalIgnoreCase.Equals("NetFx40_Legacy20SortingBehavior", current))
{
if (this._AppDomainSortingSetupInfo == null)
{
this._AppDomainSortingSetupInfo = new AppDomainSortingSetupInfo();
}
this._AppDomainSortingSetupInfo._useV2LegacySorting = true;
}
if (StringComparer.OrdinalIgnoreCase.Equals("NetFx45_Legacy40SortingBehavior", current))
{
if (this._AppDomainSortingSetupInfo == null)
{
this._AppDomainSortingSetupInfo = new AppDomainSortingSetupInfo();
}
this._AppDomainSortingSetupInfo._useV4LegacySorting = true;
}
if (StringComparer.OrdinalIgnoreCase.Equals("UseRandomizedStringHashAlgorithm", current))
{
this._UseRandomizedStringHashing = true;
}
this._CompatFlags.Add(current, null);
}
return;
}
}
this._CompatFlags = null;
}
[SecurityCritical]
public void SetNativeFunction(string functionName, int functionVersion, IntPtr functionPointer)
{
if (functionName == null)
{
throw new ArgumentNullException("functionName");
}
if (functionPointer == IntPtr.Zero)
{
throw new ArgumentNullException("functionPointer");
}
if (string.IsNullOrWhiteSpace(functionName))
{
throw new ArgumentException(Environment.GetResourceString("Argument_NPMSInvalidName"), "functionName");
}
if (functionVersion < 1)
{
throw new ArgumentException(Environment.GetResourceString("ArgumentException_MinSortingVersion", new object[]
{
1,
functionName
}));
}
if (this._AppDomainSortingSetupInfo == null)
{
this._AppDomainSortingSetupInfo = new AppDomainSortingSetupInfo();
}
if (string.Equals(functionName, "IsNLSDefinedString", StringComparison.OrdinalIgnoreCase))
{
this._AppDomainSortingSetupInfo._pfnIsNLSDefinedString = functionPointer;
}
if (string.Equals(functionName, "CompareStringEx", StringComparison.OrdinalIgnoreCase))
{
this._AppDomainSortingSetupInfo._pfnCompareStringEx = functionPointer;
}
if (string.Equals(functionName, "LCMapStringEx", StringComparison.OrdinalIgnoreCase))
{
this._AppDomainSortingSetupInfo._pfnLCMapStringEx = functionPointer;
}
if (string.Equals(functionName, "FindNLSStringEx", StringComparison.OrdinalIgnoreCase))
{
this._AppDomainSortingSetupInfo._pfnFindNLSStringEx = functionPointer;
}
if (string.Equals(functionName, "CompareStringOrdinal", StringComparison.OrdinalIgnoreCase))
{
this._AppDomainSortingSetupInfo._pfnCompareStringOrdinal = functionPointer;
}
if (string.Equals(functionName, "GetNLSVersionEx", StringComparison.OrdinalIgnoreCase))
{
this._AppDomainSortingSetupInfo._pfnGetNLSVersionEx = functionPointer;
}
if (string.Equals(functionName, "FindStringOrdinal", StringComparison.OrdinalIgnoreCase))
{
this._AppDomainSortingSetupInfo._pfnFindStringOrdinal = functionPointer;
}
}
internal ApplicationTrust InternalGetApplicationTrust()
{
if (this._ApplicationTrust == null)
{
return null;
}
SecurityElement element = SecurityElement.FromString(this._ApplicationTrust);
ApplicationTrust applicationTrust = new ApplicationTrust();
applicationTrust.FromXml(element);
return applicationTrust;
}
internal void InternalSetApplicationTrust(ApplicationTrust value)
{
if (value != null)
{
this._ApplicationTrust = value.ToXml().ToString();
return;
}
this._ApplicationTrust = null;
}
[SecurityCritical]
internal bool UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation FieldValue, string FieldKey, string UpdatedField, IntPtr fusionContext, AppDomainSetup oldADS)
{
string text = this.Value[(int)FieldValue];
string b = (oldADS == null) ? null : oldADS.Value[(int)FieldValue];
if (text != b)
{
AppDomainSetup.UpdateContextProperty(fusionContext, FieldKey, (UpdatedField == null) ? text : UpdatedField);
return true;
}
return false;
}
[SecurityCritical]
internal void UpdateBooleanContextPropertyIfNeeded(AppDomainSetup.LoaderInformation FieldValue, string FieldKey, IntPtr fusionContext, AppDomainSetup oldADS)
{
if (this.Value[(int)FieldValue] != null)
{
AppDomainSetup.UpdateContextProperty(fusionContext, FieldKey, "true");
return;
}
if (oldADS != null && oldADS.Value[(int)FieldValue] != null)
{
AppDomainSetup.UpdateContextProperty(fusionContext, FieldKey, "false");
}
}
[SecurityCritical]
internal static bool ByteArraysAreDifferent(byte[] A, byte[] B)
{
int num = A.Length;
if (num != B.Length)
{
return true;
}
for (int i = 0; i < num; i++)
{
if (A[i] != B[i])
{
return true;
}
}
return false;
}
[SecurityCritical]
internal static void UpdateByteArrayContextPropertyIfNeeded(byte[] NewArray, byte[] OldArray, string FieldKey, IntPtr fusionContext)
{
if ((NewArray != null && OldArray == null) || (NewArray == null && OldArray != null) || (NewArray != null && OldArray != null && AppDomainSetup.ByteArraysAreDifferent(NewArray, OldArray)))
{
AppDomainSetup.UpdateContextProperty(fusionContext, FieldKey, NewArray);
}
}
[SecurityCritical]
internal void SetupFusionContext(IntPtr fusionContext, AppDomainSetup oldADS)
{
this.UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.ApplicationBaseValue, AppDomainSetup.ApplicationBaseKey, null, fusionContext, oldADS);
this.UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.PrivateBinPathValue, AppDomainSetup.PrivateBinPathKey, null, fusionContext, oldADS);
this.UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.DevPathValue, AppDomainSetup.DeveloperPathKey, null, fusionContext, oldADS);
this.UpdateBooleanContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.DisallowPublisherPolicyValue, AppDomainSetup.DisallowPublisherPolicyKey, fusionContext, oldADS);
this.UpdateBooleanContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.DisallowCodeDownloadValue, AppDomainSetup.DisallowCodeDownloadKey, fusionContext, oldADS);
this.UpdateBooleanContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.DisallowBindingRedirectsValue, AppDomainSetup.DisallowBindingRedirectsKey, fusionContext, oldADS);
this.UpdateBooleanContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.DisallowAppBaseProbingValue, AppDomainSetup.DisallowAppBaseProbingKey, fusionContext, oldADS);
if (this.UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.ShadowCopyFilesValue, AppDomainSetup.ShadowCopyFilesKey, this.ShadowCopyFiles, fusionContext, oldADS))
{
if (this.Value[7] == null)
{
this.ShadowCopyDirectories = this.BuildShadowCopyDirectories();
}
this.UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.ShadowCopyDirectoriesValue, AppDomainSetup.ShadowCopyDirectoriesKey, null, fusionContext, oldADS);
}
this.UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.CachePathValue, AppDomainSetup.CachePathKey, null, fusionContext, oldADS);
this.UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.PrivateBinPathProbeValue, AppDomainSetup.PrivateBinPathProbeKey, this.PrivateBinPathProbe, fusionContext, oldADS);
this.UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.ConfigurationFileValue, AppDomainSetup.ConfigurationFileKey, null, fusionContext, oldADS);
AppDomainSetup.UpdateByteArrayContextPropertyIfNeeded(this._ConfigurationBytes, (oldADS == null) ? null : oldADS.GetConfigurationBytes(), AppDomainSetup.ConfigurationBytesKey, fusionContext);
this.UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.ApplicationNameValue, AppDomainSetup.ApplicationNameKey, this.ApplicationName, fusionContext, oldADS);
this.UpdateContextPropertyIfNeeded(AppDomainSetup.LoaderInformation.DynamicBaseValue, AppDomainSetup.DynamicBaseKey, null, fusionContext, oldADS);
AppDomainSetup.UpdateContextProperty(fusionContext, AppDomainSetup.MachineConfigKey, RuntimeEnvironment.GetRuntimeDirectoryImpl() + AppDomainSetup.RuntimeConfigurationFile);
string hostBindingFile = RuntimeEnvironment.GetHostBindingFile();
if (hostBindingFile != null || oldADS != null)
{
AppDomainSetup.UpdateContextProperty(fusionContext, AppDomainSetup.HostBindingKey, hostBindingFile);
}
}
[SecurityCritical]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern void UpdateContextProperty(IntPtr fusionContext, string key, object value);
internal static int Locate(string s)
{
if (string.IsNullOrEmpty(s))
{
return -1;
}
char c = s[0];
if (c <= 'L')
{
switch (c)
{
case 'A':
if (s == "APP_CONFIG_FILE")
{
return 1;
}
if (s == "APP_NAME")
{
return 4;
}
if (s == "APPBASE")
{
return 0;
}
if (s == "APP_CONFIG_BLOB")
{
return 15;
}
break;
case 'B':
if (s == "BINPATH_PROBE_ONLY")
{
return 6;
}
break;
case 'C':
if (s == "CACHE_BASE")
{
return 9;
}
if (s == "CODE_DOWNLOAD_DISABLED")
{
return 12;
}
break;
case 'D':
if (s == "DEV_PATH")
{
return 3;
}
if (s == "DYNAMIC_BASE")
{
return 2;
}
if (s == "DISALLOW_APP")
{
return 11;
}
if (s == "DISALLOW_APP_REDIRECTS")
{
return 13;
}
if (s == "DISALLOW_APP_BASE_PROBING")
{
return 14;
}
break;
case 'E':
break;
case 'F':
if (s == "FORCE_CACHE_INSTALL")
{
return 8;
}
break;
default:
if (c == 'L')
{
if (s == "LICENSE_FILE")
{
return 10;
}
}
break;
}
}
else
{
if (c != 'P')
{
if (c == 'S')
{
if (s == "SHADOW_COPY_DIRS")
{
return 7;
}
}
}
else
{
if (s == "PRIVATE_BINPATH")
{
return 5;
}
}
}
return -1;
}
private string NormalizePath(string path, bool useAppBase)
{
if (path == null)
{
return null;
}
if (!useAppBase)
{
path = URLString.PreProcessForExtendedPathRemoval(path, false);
}
int num = path.Length;
if (num == 0)
{
return null;
}
bool flag = false;
if (num > 7 && string.Compare(path, 0, "file:", 0, 5, StringComparison.OrdinalIgnoreCase) == 0)
{
int num2;
if (path[6] == '\\')
{
if (path[7] == '\\' || path[7] == '/')
{
if (num > 8 && (path[8] == '\\' || path[8] == '/'))
{
throw new ArgumentException(Environment.GetResourceString("Argument_InvalidPathChars"));
}
num2 = 8;
}
else
{
num2 = 5;
flag = true;
}
}
else
{
if (path[7] == '/')
{
num2 = 8;
}
else
{
if (num > 8 && path[7] == '\\' && path[8] == '\\')
{
num2 = 7;
}
else
{
num2 = 5;
StringBuilder stringBuilder = new StringBuilder(num);
for (int i = 0; i < num; i++)
{
char c = path[i];
if (c == '/')
{
stringBuilder.Append('\\');
}
else
{
stringBuilder.Append(c);
}
}
path = stringBuilder.ToString();
}
flag = true;
}
}
path = path.Substring(num2);
num -= num2;
}
bool flag2;
if (flag || (num > 1 && (path[0] == '/' || path[0] == '\\') && (path[1] == '/' || path[1] == '\\')))
{
flag2 = false;
}
else
{
int num3 = path.IndexOf(':') + 1;
flag2 = (num3 == 0 || num <= num3 + 1 || (path[num3] != '/' && path[num3] != '\\') || (path[num3 + 1] != '/' && path[num3 + 1] != '\\'));
}
if (flag2)
{
if (useAppBase && (num == 1 || path[1] != ':'))
{
string text = this.Value[0];
if (text == null || text.Length == 0)
{
throw new MemberAccessException(Environment.GetResourceString("AppDomain_AppBaseNotSet"));
}
StringBuilder stringBuilder2 = StringBuilderCache.Acquire(16);
bool flag3 = false;
if (path[0] == '/' || path[0] == '\\')
{
string text2 = Path.GetPathRoot(text);
if (text2.Length == 0)
{
int j = text.IndexOf(":/", StringComparison.Ordinal);
if (j == -1)
{
j = text.IndexOf(":\\", StringComparison.Ordinal);
}
int length = text.Length;
for (j++; j < length; j++)
{
if (text[j] != '/' && text[j] != '\\')
{
break;
}
}
while (j < length && text[j] != '/' && text[j] != '\\')
{
j++;
}
text2 = text.Substring(0, j);
}
stringBuilder2.Append(text2);
flag3 = true;
}
else
{
stringBuilder2.Append(text);
}
int num4 = stringBuilder2.Length - 1;
if (stringBuilder2[num4] != '/' && stringBuilder2[num4] != '\\')
{
if (!flag3)
{
if (text.IndexOf(":/", StringComparison.Ordinal) == -1)
{
stringBuilder2.Append('\\');
}
else
{
stringBuilder2.Append('/');
}
}
}
else
{
if (flag3)
{
stringBuilder2.Remove(num4, 1);
}
}
stringBuilder2.Append(path);
path = StringBuilderCache.GetStringAndRelease(stringBuilder2);
}
else
{
path = Path.GetFullPathInternal(path);
}
}
return path;
}
private bool IsFilePath(string path)
{
return path[1] == ':' || (path[0] == '\\' && path[1] == '\\');
}
[SecurityCritical]
private string VerifyDir(string dir, bool normalize)
{
if (dir != null)
{
if (dir.Length == 0)
{
dir = null;
}
else
{
if (normalize)
{
dir = this.NormalizePath(dir, true);
}
if (this.IsFilePath(dir))
{
new FileIOPermission(FileIOPermissionAccess.PathDiscovery, dir).Demand();
}
}
}
return dir;
}
[SecurityCritical]
private void VerifyDirList(string dirs)
{
if (dirs != null)
{
string[] array = dirs.Split(new char[]
{
';'
});
int num = array.Length;
for (int i = 0; i < num; i++)
{
this.VerifyDir(array[i], true);
}
}
}
private string BuildShadowCopyDirectories()
{
string text = this.Value[5];
if (text == null)
{
return null;
}
StringBuilder stringBuilder = StringBuilderCache.Acquire(16);
string text2 = this.Value[0];
if (text2 != null)
{
char[] separator = new char[]
{
';'
};
string[] array = text.Split(separator);
int num = array.Length;
bool flag = text2[text2.Length - 1] != '/' && text2[text2.Length - 1] != '\\';
if (num == 0)
{
stringBuilder.Append(text2);
if (flag)
{
stringBuilder.Append('\\');
}
stringBuilder.Append(text);
}
else
{
for (int i = 0; i < num; i++)
{
stringBuilder.Append(text2);
if (flag)
{
stringBuilder.Append('\\');
}
stringBuilder.Append(array[i]);
if (i < num - 1)
{
stringBuilder.Append(';');
}
}
}
}
return StringBuilderCache.GetStringAndRelease(stringBuilder);
}
}
}
Step3 : create "\ndp\clr\src\BCL\AssemblyRef.cs" file and paste the code as follows.
using System;
internal static class AssemblyRef
{
internal const string EcmaPublicKey = "b77a5c561934e089";
internal const string EcmaPublicKeyToken = "b77a5c561934e089";
internal const string EcmaPublicKeyFull = "00000000000000000400000000000000";
internal const string SilverlightPublicKey = "31bf3856ad364e35";
internal const string SilverlightPublicKeyToken = "31bf3856ad364e35";
internal const string SilverlightPublicKeyFull = "0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9";
internal const string SilverlightPlatformPublicKey = "7cec85d7bea7798e";
internal const string SilverlightPlatformPublicKeyToken = "7cec85d7bea7798e";
internal const string SilverlightPlatformPublicKeyFull = "00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB";
internal const string PlatformPublicKey = "b77a5c561934e089";
internal const string PlatformPublicKeyToken = "b77a5c561934e089";
internal const string PlatformPublicKeyFull = "00000000000000000400000000000000";
internal const string Mscorlib = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemData = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemDataOracleClient = "System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string System = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemCore = "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemNumerics = "System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemRuntimeRemoting = "System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemThreadingTasksDataflow = "System.Threading.Tasks.Dataflow, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemWindowsForms = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemXml = "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string MicrosoftPublicKey = "b03f5f7f11d50a3a";
internal const string MicrosoftPublicKeyToken = "b03f5f7f11d50a3a";
internal const string MicrosoftPublicKeyFull = "002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293";
internal const string SharedLibPublicKey = "31bf3856ad364e35";
internal const string SharedLibPublicKeyToken = "31bf3856ad364e35";
internal const string SharedLibPublicKeyFull = "0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9";
internal const string SystemComponentModelDataAnnotations = "System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
internal const string SystemConfiguration = "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemConfigurationInstall = "System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemDeployment = "System.Deployment, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemDesign = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemDirectoryServices = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemDrawingDesign = "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemDrawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemEnterpriseServices = "System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemManagement = "System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemMessaging = "System.Messaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemNetHttp = "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemNetHttpWebRequest = "System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemRuntimeSerializationFormattersSoap = "System.Runtime.Serialization.Formatters.Soap, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemRuntimeWindowsRuntime = "System.Runtime.WindowsRuntime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemRuntimeWindowsRuntimeUIXaml = "System.Runtime.WindowsRuntimeUIXaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemSecurity = "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemServiceModelWeb = "System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
internal const string SystemServiceProcess = "System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemWeb = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemWebAbstractions = "System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
internal const string SystemWebDynamicData = "System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
internal const string SystemWebDynamicDataDesign = "System.Web.DynamicData.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
internal const string SystemWebEntityDesign = "System.Web.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
internal const string SystemWebExtensions = "System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
internal const string SystemWebExtensionsDesign = "System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
internal const string SystemWebMobile = "System.Web.Mobile, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemWebRegularExpressions = "System.Web.RegularExpressions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemWebRouting = "System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
internal const string SystemWebServices = "System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string WindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
internal const string MicrosoftVisualStudio = "Microsoft.VisualStudio, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string MicrosoftVisualStudioWindowsForms = "Microsoft.VisualStudio.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string VJSharpCodeProvider = "VJSharpCodeProvider, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string ASPBrowserCapsPublicKey = "b7bd7678b977bd8f";
internal const string ASPBrowserCapsFactory = "ASP.BrowserCapsFactory, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b7bd7678b977bd8f";
internal const string MicrosoftVSDesigner = "Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string MicrosoftVisualStudioWeb = "Microsoft.VisualStudio.Web, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string MicrosoftWebDesign = "Microsoft.Web.Design.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string MicrosoftVSDesignerMobile = "Microsoft.VSDesigner.Mobile, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string MicrosoftJScript = "Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
}
Step4 : create "\ndp\clr\src\BCL\ThisAssembly.cs" and paste the code as follows.
using System;
internal static class ThisAssembly
{
internal const string Title = "mscorlib.dll";
internal const string Description = "mscorlib.dll";
internal const string DefaultAlias = "mscorlib.dll";
internal const string Copyright = "© Microsoft Corporation. All rights reserved.";
internal const string Version = "4.0.0.0";
internal const string InformationalVersion = "4.0.30319.18444";
internal const string DailyBuildNumberStr = "30319";
internal const string BuildRevisionStr = "18444";
internal const int DailyBuildNumber = 30319;
}
Step5 : modify "\ndp\clr\src\BCL\System\Globalization\RegionInfo.cs".
before :
using System;
internal static class ThisAssembly
{
internal const string Title = "mscorlib.dll";
internal const string Description = "mscorlib.dll";
internal const string DefaultAlias = "mscorlib.dll";
internal const string Copyright = "© Microsoft Corporation. All rights reserved.";
internal const string Version = "4.0.0.0";
internal const string InformationalVersion = "4.0.30319.18444";
internal const string DailyBuildNumberStr = "30319";
internal const string BuildRevisionStr = "18444";
internal const int DailyBuildNumber = 30319;
}
after :
        public virtual String DisplayName
{
[System.Security.SecuritySafeCritical] // auto-generated
get
{
// return (this.m_cultureData.SLOCALIZED----);
return (this.m_cultureData.SLOCALIZEDCOUNTRY);
}
}
Now, if you rebuild the project, you may get some warnnings with no errors. And the mscorlib.dll is builded with visual studio. Just enjoy it!

How to build mscorlib.dll with visual studio的更多相关文章

  1. vs2012+cmake+opencv+opencv unable to find a build program corresponding to "Visual Studio 12 Win64". CMAKE_MAKE_PROGRAM is not set

    搜索了下,说什么的都有! 一,提示找不到 cmake-2.8.12.1 的 modles 卸载了cmake后发现 cmd 中的 cmake --version 还是 2.8.11.1 找到是我的cyg ...

  2. Visual Studio 中的 .NET Framework 类库

    Visual Studio 中的 .NET Framework 类库 .NET Framework 类库由命名空间组成.每个命名空间都包含可在程序中使用的类型:类.结构.枚举.委托和接口. 当您在 V ...

  3. Visual Studio 中 Build 和 Rebuild 的区别

    因为之前写的程序比较小,编译起来比较快,所以一直都没有太在意 Build 和 Rebuild 之间的区别,后来发现两个还是有很大不同. Build 只针对在上次编译之后更改过的文件进行编译,在项目比较 ...

  4. Visual Studio问题集锦:coloader80.dll未正确安装

    问题 今天在修改之前的一个项目的时候报了一个错,大概内容如下: 有一个 Visual Studio 的 DLL 文件(coloader80.dll)未正确安装.请通过"控制面板"中 ...

  5. Visual Studio Support (DDEX)

    原文 VS2012,VS2013,and VS2015Pro+NpgsqlDdexProvider+EFv6 how to(by @kenjiuno) Reference: #213 Overview ...

  6. Continuous Integration for iOS Apps with Visual Studio Team Services

    原文引用自:https://blog.xamarin.com/continuous-integration-for-ios-apps-with-visual-studio-team-services/ ...

  7. 如何使用Visual Studio构建libiconv

    参考博文:How to Build libiconv with Microsoft Visual Studio - CodeProject libiconv源码下载地址:libiconv - GNU ...

  8. Quickstart: Create and publish a package using Visual Studio (.NET Framework, Windows)

    https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio-n ...

  9. [百度网盘]Xamarin for Visual Studio 3.7.165 Preview 最新版-介绍

    Xamarin 3.7.165 Preview 下载地址:http://download.xamarin.com/XamarinforVisualStudio/Windows/Xamarin.Visu ...

随机推荐

  1. 实现微信浏览器自动播放MP3音乐

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  2. jQuery的$(window).load与、(document).ready和window.onload的关系

    jQuery的$(window).load与.(document).ready和window.onload的关系 $(function() { console.log('document.ready ...

  3. LinkedHashMap遍历

    第一种: Map map = new HashMap(); Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Ma ...

  4. Docker,容器,虚拟机和红烧肉

    Docker火了,有多火你自己看看下面的统计数据就知道了 在发布4个月的时间里,下载量就超过50000次,github上收到超过4000个star,涌现了超过100个贡献者,并且有超过150个项目和超 ...

  5. SQL2008实现数据库自动定时备份——维护计划

    在SQL Server中出于数据安全的考虑,所以需要定期的备份数据库.而备份数据库一般又是在凌晨时间基本没有数据库操作的时候进行,所以我们不可能要求管理员 每天守到晚上1点去备份数据库.要实现数据库的 ...

  6. Spring Boot启动过程(二)

    书接上篇 该说refreshContext(context)了,首先是判断context是否是AbstractApplicationContext派生类的实例,之后调用了强转为AbstractAppl ...

  7. asp.net权限认证:HTTP基本认证(http basic)

    asp.net权限认证系列 asp.net权限认证:Forms认证 asp.net权限认证:HTTP基本认证(http basic) asp.net权限认证:Windows认证 asp.net权限认证 ...

  8. 日志组件 logback

    一.简介 Logback是由log4j创始人设计的又一个开源日志组件.logback当前分成三个模块:logback-core,logback- classic和logback-access.logb ...

  9. db_link

    1.查询 SYSDBA登录, sys登录    SELECT * FROM SYS.link$; select owner,object_name from dba_objects where obj ...

  10. ArcGIS制图表达Representation-规则和几何效果

    ArcGIS制图表达Representation-规则和几何效果 by 李远祥 对制图表达运用是否纯熟,主要是看对制图表达规则的理解和巧妙运用.前面章节已经粗略介绍过制图表达的运用,通过一些简单的规则 ...