aspnet / Tooling

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

Intellisense File Picker in css or scss inserts incorrect path if you select a different directory other than the current one #370

Open jmalatia opened 8 years ago

jmalatia commented 8 years ago

In a css or scss file when you make a body {background-image: url(""); } an intellisense file picker shows up allowing you to select the file you wish to insert. If you select a file in the current directory, everything works fine, but if you select a subdirectory or go up a level (../) to a parent directory in the path it writes the path correctly when you switch directories the first time, but when you select the next file or directory it writes the entire path again, instead of just inserting the file path fragment. Here is a sample of what I mean.

Sample directory structure:

Root
   - css
        |-site.css
   - images
        |-sample.jpg

In site.css we want to have:

 body {
    background-image: url('../images/sample.jpg');
}

When you use the intellisense file picker to select the url by drilling-down, when you select "../" to go up a directory level it writes correctly url('../'); and then shows you files/folders in that directory. But when you make your second selection for the folder "images", it then writes url('../../images'); inserting the full path to that file/folder instead of just the fragment "images/". This then causes intellisense to no longer work, because the path of "../../images" does not exist!

This issue happened in our version of VS2015 and updating to Update 1 did not fix the problem. Tested the same projects in VS2013 and they work correctly as expected

1 2 3 4

sayedihashimi commented 8 years ago

TFS Bug#231182

webtools-bot commented 7 years ago

The GitHub Issue Tracker for the aspnet/Tooling repo is being deprecated in favor of Visual Studio's Report a Problem tool.

If this issue is still a problem with the RTW release of Visual Studio 2017, please report a new issue using the Report a Problem tool. While you can still use .NET Core and ASP.NET Preview tools with Visual Studio 2015, Visual Studio 2017 is now the officially supported tool for developing .NET Core and ASP.NET Core projects.

By using the Report a Problem tool (available in both VS 2017 and VS 2015), you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See Visual Studio's Talk to Us page for more details.

Please use the discussion topic here for feedback and questions on the deprecation of this issue tracker. Thanks!