aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
258 stars 124 forks source link

Nesting bug #1066

Closed rjamesnw closed 6 years ago

rjamesnw commented 6 years ago

The is a problem nesting embedded resources. I was experimenting with nesting .cshtml files using the existing rules and did this:

Modal.cs (bootstrap modal web component) -> Modal.cs.cshtml (it's view file)

Modal.cs.cshtml is set to Embedded Resource, and clearly shows it, but is completed IGNORED by the build process (simply open the DLL in a text editor [such as Notepad++] and scroll to the bottom and look for text). If I rename the file to "Modal.cshtml" instead it works perfectly fine! :/ I don't think whether or not a file is embedded should have and role in excluding a file from being embedded so this seems like a bug to me.

Yes, I'm aware of upcoming nesting controls in v15.6, but I'm not able to install it yet, and regardless, this should work fine, so it should be looked into nonetheless.

Just to add: I'm using wild-cards to include the file. If I explicitly add it I get this:

Duplicate 'EmbeddedResource' items were included. ...

So it's clearly found. It's obviously something up with the build process not finding the nested file.

barrytang commented 6 years ago

To report new issues, use the Report a Problem tool. The GitHub Issue Tracker for the aspnet/Tooling repo is now deprecated in favor of the Report a Problem tool.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See here for more details.

barrytang commented 6 years ago

@abpiskunov who owns the feature in VS as FYI