microsoft / microsoft/vscode-dotnettools

[WebToolsE2E][Blue] Razor IntelliSense does not auto-trigger for href="~/" in VS Code

Open
#3,349 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
No language data
Stars
321
Forks
54
Avg merge
2d 19h
Merged PRs (30d)
2

Description

REGRESSION INFO: Repro with C# Dev Kit April release (3.20.199)

INSTALL STEPS

OS: windows x64 / MAC

  1. Install the SDK 10.0.302
  2. Install VS Code insiders - 1.131.0
  3. Install C# Dev Kit May prerelease 7 (3.27.196)

REPRO STEPS

  1. Open VS Code > Create .NET Project > ASP.NET Core Web App (Razor Pages) > Create
  2. Open Pages/Shared/_Layout.cshtml
  3. In the section, type the following code
    <link rel="stylesheet" href="~/
  4. Verify the intellisense list shows

Note:

  1. Repro with Razor/MVC
  2. Workaround works, pressing Ctrl+Space to manually invoke IntelliSense.

ACTUAL
Image

EXPECTED
IntelliSense should automatically show after typing href="~/".
Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by creating the ASP.NET Core Web App (Razor Pages) project in VS Code and open Pages/Shared/_Layout.cshtml. Reproduce the issue by typing <link rel="stylesheet" href="/" in the head section, then compare automatic IntelliSense with manual Ctrl+Space invocation. Done means the IntelliSense list appears automatically after typing href="/".

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.