/// <summary>
        /// Generates project files for Visual Studio: '.vcxproj' and '.vcxproj.filter'.
        /// </summary>
        /// <param name="project">Parsed project object.</param>
        /// <returns>Path to Visual Studio's '.vcxproj file'.</returns>
        public override sealed string GenerateProjectFiles(ProjectCache project)
        {
            var vcxProjPath = Path.Combine(base.GenerateProjectFiles(project), project.CachedName) + ".vcxproj";

            try
            {
                // For build tools the best was is to load a GUID from project files: this causes exceptions
                // in Visual Studio when reloading of solution, and all opened tabs would be terminated.
                project.AdditionalCache.GUID = QueryGuidFromProject(vcxProjPath);
            }
            catch (Exception)
            {
                project.AdditionalCache.GUID = CreateMsBuildGuid();
            }

            // ==========================================================================================
            // Generating VCXPROJ files.
            // ==========================================================================================
            using (var vcxProj = new XmlTextWriter(vcxProjPath, null) { Formatting = Formatting.Indented, Indentation = 1, IndentChar = '\t' })
            {
                vcxProj.WriteStartDocument();
                vcxProj.WriteComment("Generated by GoddamnBuildSystem. Please, do not edit this file manually.");
                vcxProj./**/WriteStartElement("Project", c_MsBuild2003Namespace);
                vcxProj./**//**/WriteAttributeString("ToolsVersion", c_ToolsVersion);
                vcxProj./**//**/WriteAttributeString("DefaultTargets", "Build");

                // ------------------------------------------------------------------------------------------
                // Defining list of configurations.
                // ------------------------------------------------------------------------------------------
                vcxProj.WriteStartElement("ItemGroup");
                vcxProj./**/WriteAttributeString("Label", "ProjectConfigurations");
                foreach (var platform in TargetInfo.EnumerateAllPlatforms())
                {
                    var platformString = ConvertPlatformToMsBuildPlatform(platform);
                    foreach (var configuration in TargetInfo.EnumerateAllConfigurations())
                    {
                        var configurationName = string.Concat(configuration, platform);
                        vcxProj./**/WriteStartElement("ProjectConfiguration");
                        vcxProj./**//**/WriteAttributeString("Include", configurationName + '|' + platformString);
                        vcxProj./**//**/WriteElementString("Configuration", configurationName);
                        vcxProj./**//**/WriteElementString("Platform", platformString);
                        vcxProj./**/WriteEndElement();
                    }
                }
                vcxProj.WriteEndElement();

                // ------------------------------------------------------------------------------------------
                // Defining list of source files.
                // ------------------------------------------------------------------------------------------
                vcxProj.WriteStartElement("ItemGroup");
                foreach (var projectSource in project.CachedSourceFiles)
                {
                    vcxProj./**/WriteStartElement(ConvertFileTypeToVcxProjElement(projectSource.FileType));
                    vcxProj./**//**/WriteAttributeString("Include", projectSource.FileName);
                    foreach (var platform in TargetInfo.EnumerateAllPlatforms())
                    {
                        var platformString = ConvertPlatformToMsBuildPlatform(platform);
                        foreach (var configuration in TargetInfo.EnumerateAllConfigurations())
                        {
                            if (projectSource.ShouldBeExcluded(platform, configuration))
                            {
                                var configurationName = string.Concat(configuration, platform);
                                vcxProj./**//**/WriteStartElement("ExcludedFromBuild");
                                vcxProj./**//**//**/WriteAttributeStringFormat("Condition", @"'$(Configuration)|$(Platform)'=='{0}|{1}'", configurationName, platformString);
                                vcxProj./**//**//**/WriteString("true");
                                vcxProj./**//**/WriteEndElement();
                            }
                        }
                    }
                    vcxProj./**/WriteEndElement();
                }
                vcxProj.WriteEndElement();

                // ------------------------------------------------------------------------------------------
                // Overriding global project properties.
                // ------------------------------------------------------------------------------------------
                vcxProj.WriteStartElement("PropertyGroup");
                vcxProj./**/WriteElementString("ProjectGuid", project.AdditionalCache.GUID);
                vcxProj./**/WriteElementString("RootNamespace", project.CachedName);
                vcxProj./**/WriteElementString("MinimumVisualStudioVersion", "14.0");
                vcxProj.WriteEndElement();
                foreach (var platform in TargetInfo.EnumerateAllPlatforms())
                {
                    var platformString = ConvertPlatformToMsBuildPlatform(platform);
                    foreach (var configuration in TargetInfo.EnumerateAllConfigurations())
                    {
                        var configurationName = string.Concat(configuration, platform);
                        vcxProj.WriteStartElement("PropertyGroup");
                        vcxProj./**/WriteAttributeStringFormat("Condition", "'$(Configuration)|$(Platform)'=='{0}|{1}'", configurationName, platformString);
                        vcxProj./**/WriteAttributeString("Label", "Globals");
                        if (TargetInfo.IsMicrosoftPlatform(platform))
                        {
                            //vcxProj./**/WriteElementString("AppContainerApplication", "true");
                            //vcxProj./**/WriteElementString("ApplicationType", "Windows Store");
                            //vcxProj./**/WriteElementString("WindowsTargetPlatformVersion", "10.0.10240.0");
                            //vcxProj./**/WriteElementString("WindowsTargetPlatformMinVersion", "10.0.10240.0");
                            //vcxProj./**/WriteElementString("ApplicationTypeRevision", "10");
                        }
                        vcxProj.WriteEndElement();
                    }