SeanCline/Npp-VS2012-Dark

Support for csproj/vbproj and sln files

Closed this issue · 3 comments

Project files (*.csproj / *.vbproj) are not mentioned in the theme. Although they are XML, adding them to the XML lexer type does not result in any syntax hiliting.
The updated theme fragment:

        <LexerType name="xml" desc="XML" ext="xaml sln vcxproj svg xul csproj vbproj">

A sample csproj file fragment, screen snap of Notepad++, no syntax hiliting:
image

The same csproj file fragment with Markdown syntax hiliting:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{886B60BF-B17F-4534-8977-6F5D0C047367}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>ClassLibrary1</RootNamespace>
    <AssemblyName>ClassLibrary1</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>

Solution (*.sln) files are already included in the XML lexer but similarly there is no syntax hiliting.

Having closed and re-opened Notepad++ now the hiliting is working for my *.csproj file. Duh! If you want a pull request for this minor change I will submit one, let me know.

But solution file is still a problem. Any ideas how to handle that?

Solution file fragment, screen snap of Notepad++, no syntax hiliting:
image

Solution file fragment, but no Markdown syntax hiliting because it isn't actually XML

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lapointe.PowerShell.MamlGenerator", "Lapointe.PowerShell.MamlGenerator\Lapointe.PowerShell.MamlGenerator.csproj", "{E4CA890C-49C0-4B13-991A-A1541ADFBFA8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lapointe.SharePoint2013.PowerShell", "Lapointe.SharePoint2013.PowerShell\Lapointe.SharePoint2013.PowerShell.csproj", "{229309DE-DB5E-4824-98AD-DE321A30388C}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        DebugFoundation|Any CPU = DebugFoundation|Any CPU
        DebugMOSS|Any CPU = DebugMOSS|Any CPU
        Release|Any CPU = Release|Any CPU
        ReleaseFoundation|Any CPU = ReleaseFoundation|Any CPU
        ReleaseMOSS|Any CPU = ReleaseMOSS|Any CPU
    EndGlobalSection

You are definitely correct, the msbuild-style project files should be listed as xml extensions. If you don't want to make a pull request, I'll add them.

As far as solution files are concerned, I don't recognise their format at all. Putting them in the set of xml extensions was an oversight. In the past, I've just manually picked C++ or VB as the lexer when editing them so they at least have some colour.

Thanks for the patch, just as well that you did it as I wouldn't necessarily have included all the variants.