fsprojects / fsprojects/Paket

Strange conflict with MVC and ~

Open
#4,047 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

We are experiencing some sort of conflict between mvc and this package. Basically we are referencing a css file using a relative path and its no longer converting the ~ sign.. for example "/styles/core.css" converts to "https://localhost:5000//styles/core.css" instead of "https://localhost:5000/styles/core.css".

The funny thing is that this does not happen on every machine but the issue goes away once we remove the package.

We are using asp net core 2.1.

Repro steps
  1. In the header of the Index.cshtml include this: <link rel="stylesheet" href="~/styles/core.css" asp-append-version="true" />

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 with the Index.cshtml reproduction and verify how the ~/styles/core.css reference is rendered under ASP.NET Core 2.1 with Paket installed and removed. Compare the resulting href values across the affected and unaffected environments, then identify the package interaction responsible. Done means the tilde resolves to /styles/core.css consistently.

Written by the indexing model from the issue text.

Assessment

Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.