fsprojects / Paket

A dependency manager for .NET with support for NuGet packages and Git repositories.
https://fsprojects.github.io/Paket/
MIT License
2.02k stars 524 forks source link

Strange conflict with MVC and ~ #4047

Open kpcauchi opened 3 years ago

kpcauchi commented 3 years ago

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" />
baronfel commented 3 years ago

Without more I'm not sure how to help you. This package is a dependency manager for .net, and has little to do with how your webserver writes or rewrites routes to static content files.

Do you have any more detail into how you came to your conclusion? There might be more to the story.