I suggest you ...

Use new project format for .njsproj files

This suggestion is migrated to Developer Community. Please use below link to view the current status.
https://developercommunity.visualstudio.com/content/idea/351736/use-new-project-format-for-njsproj-files.html
This is a bit of nit pick, but it would be nice if the .njsproj files used a leaner project format like the new MSBuild 5/.NET Core SDK proj format. I realize that some of that has to do with pre-defined stuff that get's included by the sdk but perhaps similar tooling could be put in place to make .njsproj files which exist solely for the benefit of visual studio to get pared down to only what is absolutely relevant for a developer.

4 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Kristoffer Garcia shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Kristoffer Garcia commented  ·   ·  Flag as inappropriate

        A fresh .njsproj file looks like
        ```
        <?xml version="1.0" encoding="utf-8"?>
        <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003&quot; ToolsVersion="4.0">
        <PropertyGroup>
        <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
        <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
        <Name>NodejsWebApp1</Name>
        <RootNamespace>NodejsWebApp1</RootNamespace>
        </PropertyGroup>
        <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
        <PropertyGroup>
        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
        <SchemaVersion>2.0</SchemaVersion>
        <ProjectGuid>18e8f852-3255-491d-8c90-e895d94f2387</ProjectGuid>
        <ProjectHome>.</ProjectHome>
        <StartupFile>server.ts</StartupFile>
        <StartWebBrowser>True</StartWebBrowser>
        <SearchPath>
        </SearchPath>
        <WorkingDirectory>.</WorkingDirectory>
        <OutputPath>.</OutputPath>
        <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
        <ProjectTypeGuids>{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{349c5851-65df-11da-9384-00065b846f21};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}</ProjectTypeGuids>
        <NodejsPort>1337</NodejsPort>
        <TypeScriptSourceMap>true</TypeScriptSourceMap>
        <TypeScriptModuleKind>CommonJS</TypeScriptModuleKind>
        <TypeScriptToolsVersion>3.0</TypeScriptToolsVersion>
        <EnableTypeScript>true</EnableTypeScript>
        <StartWebBrowser>true</StartWebBrowser>
        </PropertyGroup>
        <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
        <DebugSymbols>true</DebugSymbols>
        </PropertyGroup>
        <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
        <DebugSymbols>true</DebugSymbols>
        </PropertyGroup>
        <ItemGroup>
        <TypeScriptCompile Include="server.ts" />
        <Content Include="tsconfig.json" />
        <Content Include="package.json" />
        <Content Include="README.md" />
        </ItemGroup>
        <!-- Do not delete the following Import Project. While this appears to do nothing it is a marker for setting TypeScript properties before our import that depends on them. -->
        <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="False" />
        <Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />
        <ProjectExtensions>
        <VisualStudio>
        <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
        <UseIIS>False</UseIIS>
        <AutoAssignPort>True</AutoAssignPort>
        <DevelopmentServerPort>0</DevelopmentServerPort>
        <DevelopmentServerVPath>/</DevelopmentServerVPath>
        <IISUrl>http://localhost:48022/</IISUrl>
        <NTLMAuthentication>False</NTLMAuthentication>
        <UseCustomServer>True</UseCustomServer>
        <CustomServerUrl>http://localhost:1337</CustomServerUrl>
        <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
        </FlavorProperties>
        <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}" User="">
        <WebProjectProperties>
        <StartPageUrl>
        </StartPageUrl>
        <StartAction>CurrentPage</StartAction>
        <AspNetDebugging>True</AspNetDebugging>
        <SilverlightDebugging>False</SilverlightDebugging>
        <NativeDebugging>False</NativeDebugging>
        <SQLDebugging>False</SQLDebugging>
        <ExternalProgram>
        </ExternalProgram>
        <StartExternalURL>
        </StartExternalURL>
        <StartCmdLineArguments>
        </StartCmdLineArguments>
        <StartWorkingDirectory>
        </StartWorkingDirectory>
        <EnableENC>False</EnableENC>
        <AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
        </WebProjectProperties>
        </FlavorProperties>
        </VisualStudio>
        </ProjectExtensions>
        </Project>
        ```

        A clean re-imagining

        ```
        <Project Sdk="Microsoft.NodeJs.Sdk">
        <PropertyGroup>
        <Name>NodejsWebApp1</Name>
        </PropertyGroup>
        <ItemGroup>
        <TypeScriptCompile Include="server.ts" />
        <Content Include="tsconfig.json" />
        <Content Include="package.json" />
        <Content Include="README.md" />
        </ItemGroup>
        <WebProjectProperties>
        <UseIIS>False</UseIIS>
        <AutoAssignPort>True</AutoAssignPort>
        <DevelopmentServerPort>0</DevelopmentServerPort>
        <DevelopmentServerVPath>/</DevelopmentServerVPath>
        <IISUrl>http://localhost:48022/</IISUrl>
        <NTLMAuthentication>False</NTLMAuthentication>
        <UseCustomServer>True</UseCustomServer>
        <CustomServerUrl>http://localhost:1337</CustomServerUrl>
        <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
        </Project>
        ```

      Feedback and Knowledge Base