Skip to content
Merged
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
16 changes: 8 additions & 8 deletions src/Build/Definition/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,11 @@ private Project(XmlReader xmlReader, IDictionary<string, string> globalPropertie
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ProjectCollection = projectCollection;
var defailtImplementation = new ProjectImpl(this, xmlReader, globalProperties, toolsVersion, subToolsetVersion, loadSettings, evaluationContext);
implementationInternal = (IProjectLinkInternal)defailtImplementation;
implementation = defailtImplementation;
var defaultImplementation = new ProjectImpl(this, xmlReader, globalProperties, toolsVersion, subToolsetVersion, loadSettings, evaluationContext);
implementationInternal = (IProjectLinkInternal)defaultImplementation;
implementation = defaultImplementation;

defailtImplementation.Initialize(globalProperties, toolsVersion, subToolsetVersion, loadSettings, evaluationContext);
defaultImplementation.Initialize(globalProperties, toolsVersion, subToolsetVersion, loadSettings, evaluationContext);
}

/// <summary>
Expand Down Expand Up @@ -447,15 +447,15 @@ private Project(string projectFile, IDictionary<string, string> globalProperties
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));

ProjectCollection = projectCollection;
var defailtImplementation = new ProjectImpl(this, projectFile, globalProperties, toolsVersion, subToolsetVersion, loadSettings, evaluationContext);
implementationInternal = (IProjectLinkInternal)defailtImplementation;
implementation = defailtImplementation;
var defaultImplementation = new ProjectImpl(this, projectFile, globalProperties, toolsVersion, subToolsetVersion, loadSettings, evaluationContext);
implementationInternal = (IProjectLinkInternal)defaultImplementation;
implementation = defaultImplementation;

// Note: not sure why only this ctor flavor do TryUnloadProject
// seems the XmlReader based one should also clean the same way.
try
{
defailtImplementation.Initialize(globalProperties, toolsVersion, subToolsetVersion, loadSettings, evaluationContext);
defaultImplementation.Initialize(globalProperties, toolsVersion, subToolsetVersion, loadSettings, evaluationContext);
}
catch (Exception ex)
{
Expand Down