Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalizing .njsproj files #2352

Open
shravan2x opened this issue Dec 28, 2021 · 0 comments
Open

Normalizing .njsproj files #2352

shravan2x opened this issue Dec 28, 2021 · 0 comments

Comments

@shravan2x
Copy link

I use a NodeJs project (.njsproj) in VS2022 for a React-based SPA. Committing code in this project is difficult because of seemingly insignificant changes in the .njsproj file:

  1. Some .js files are marked <Compile>, others are <Content>. JSX files are similarly split.
  2. CSS files (.css) are usually marked <Content>. But it's unclear why, as they're usually compiled by webpack too.
  3. Some random <Compile> and <Content> entries have <SubType>Code</SubType> but others don't.
  4. Some entries are sorted, other newly created entries are are placed randomly.

My project was created in an earlier version of VS (VS2015 I think) and upgraded over time, but even a new project created in VS2022 has the third issue. This is what a new NodeJs project looks like (with a .jsx and .css file created):

  <ItemGroup>
    <Content Include="app.js" />
    <Content Include="JavaScript1.jsx">
      <SubType>Code</SubType>
    </Content>
    <Content Include="package.json" />
    <Content Include="README.md" />
    <Content Include="StyleSheet1.css">
      <SubType>Code</SubType>
    </Content>
  </ItemGroup>

Could we have the tooling normalize these files when a project is opened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant