/// <summary> /// Logs a <see cref="ProjectStartedEventArgs" /> object for the specified project. /// </summary> /// <param name="logger">An <see cref="ISlnGenLogger" /> to use.</param> /// <param name="projectInstance">The <see cref="ProjectInstance" /> of the project.</param> internal static void LogProjectStartedEvent(ISlnGenLogger logger, ProjectInstance projectInstance) { if (!logger.IsDiagnostic) { return; } int projectId = logger.NextProjectId; logger.LogEvent(new ProjectStartedEventArgs( projectId: projectId, message: $"Project \"{projectInstance.FullPath}\"", helpKeyword: null, projectFile: projectInstance.FullPath, targetNames: null, properties: projectInstance.Properties.Select(i => new DictionaryEntry(i.Name, i.EvaluatedValue)), items: projectInstance.Items.Select(i => new DictionaryEntry(i.ItemType, new ProjectItemWrapper(i))), parentBuildEventContext: BuildEventContext.Invalid, globalProperties: projectInstance.GlobalProperties, toolsVersion: null) { BuildEventContext = new BuildEventContext(BuildEventContext.InvalidSubmissionId, BuildEventContext.InvalidNodeId, projectInstance.EvaluationId, projectId, projectId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId), }); }