This project is read-only.
1
Vote

Bug in ProjectNode.cs

description

There is a line of code in Microsoft.VisualStudio.Project.ProjectNode.GetAssemblyName that prevents the node from recognizing the project output type. The corrected method is provided below.
        private string GetAssemblyName(MSBuildExecution.ProjectInstance properties)
        {
            this.currentConfig = properties;
            string name = null;

            name = GetProjectProperty(ProjectFileConstants.AssemblyName);
            if (name == null)
                name = this.Caption;

            string outputtype = GetProjectProperty(ProjectFileConstants.OutputType, false);
            outputtype = outputtype.ToLowerInvariant(); // <-- (JFH) moved from below

            if (outputtype == "library")
            {
                // JFH: The following statement is in the wrong place.  
                //         It should precede the comparison.
                //outputtype = outputtype.ToLowerInvariant();
                name += ".dll";
            }
            else
            {
                name += ".exe";
            }

            return name;
        }

comments