Taritsyn / WebMarkupMin

The Web Markup Minifier (abbreviated WebMarkupMin) - a .NET library that contains a set of markup minifiers. The objective of this project is to improve the performance of web applications by reducing the size of HTML, XHTML and XML code.
Apache License 2.0
451 stars 48 forks source link

WebMarkupMin breaks after updating to ASP.NET 2.0 Core #41

Closed sebastianbk closed 7 years ago

sebastianbk commented 7 years ago

After updating to ASP.NET Core 2.0 the WebMarkupMin.AspNetCore1 library is unable to locate the method MediaTypeHeaderValue.TryParse and throws a MissingMethodException. However, when using IntelliSense in Visual Studio 2017 (15.3) I have no problem finding and using that method.

I am using version 2.4.0 of WebMarkupMin.AspNetCore1. I tried manually adding the System.Net.Http and Microsoft.Net.Http NuGet packages but that did not help. I also tried adding these settings to my csproj file that didn't help either.

<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

Here is a screenshot of the error page I get.

https://pbs.twimg.com/media/DHQr-ETXsAAJWYk.jpg:large

I hope there is a simple fix to this issue, as I love WebMarkupMin and I would really like to use it with ASP.NET Core 2.0.

Taritsyn commented 7 years ago

Hello, Sebastian!

Thanks for information. Soon I will start to solve this problem.

Taritsyn commented 7 years ago

Hello, Sebastian!

In version 2.4.2 fixed this error. Now you need to use the WebMarkupMin.AspNetCore2 module instead of the WebMarkupMin.AspNetCore1.

sebastianbk commented 7 years ago

@Taritsyn, you are a superhero! Thanks a lot for all of your amazing work!