dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.44k stars 10.02k forks source link

VS2019 does not respect default Content glob **/*.json #19964

Open vsfeedback opened 4 years ago

vsfeedback commented 4 years ago

This issue has been moved from a ticket on Developer Community.


When switching to VS2019 from VS2017, we found that our ASP.NET Core project would include JSON files as build action "None" instead of "Content". According to https://github.com/dotnet/docs/issues/10272, "*/\.json" is a default content glob (like "*/\.config").

This came up because Microsoft.TypeScript.MSBuild was not recognizing our tsconfig.json (it only recognizes a file of that name if it has build action "Content").

Using MSBuild directly or building with VS2017 do respect this default.


Original Comments

Visual Studio Feedback System on 3/15/2020, 07:27 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

mkArtakMSFT commented 4 years ago

Looks like this should be configured here: https://github.com/dotnet/aspnetcore-tooling/blob/e3fb7ccd38ecf13c41ff73583f1a6a8bdec4c149/src/Razor/src/Microsoft.NET.Sdk.Razor/Sdk/Sdk.Razor.StaticAssets.ProjectSystem.props

Lizzy-Gallagher commented 4 years ago

Hello @mkArtakMSFT. I just wanted to identify myself as the reporter of this issue. A few other folks on my team have run into this since switching to VS2019. I am happy to answer any questions you might have about setup / versions.

mkArtakMSFT commented 4 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

javiercn commented 4 years ago

As a workaround I believe you can setup something in Directory.Build.props to deal with this (remove from None and add to Content)