You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then rebuild your solution, which should also restart the app.
39
39
40
+
If you're using Razor `@helper` functions placed inside the `App_Code` folder, you have to do additional configuration in order to minify those. In the root `Web.config`, you should see something like this:
The minifier processes the code generated during Razor compilation. Because it runs in compile-time, it shouldn't add any overhead during runtime.
45
60
46
-
The entire source code is just a [single file](https://github.com/tompazourek/RazorHtmlMinifier.Mvc5/blob/master/src/RazorHtmlMinifier.Mvc5/MinifyingMvcWebRazorHostFactory.cs), feel free to view it.
61
+
The entire source code is just [two](/src/RazorHtmlMinifier.Mvc5/MinifyingMvcWebRazorHostFactory.cs)[files](/src/RazorHtmlMinifier.Mvc5/MinifyingRazorBuildProvider.cs), feel free to view them.
47
62
48
63
The minification algorithm is fairly trivial. It basically:
49
64
@@ -67,10 +82,10 @@ I've investigated this and it looks like **VS actually needs to have the assembl
67
82
68
83
If you want to add the assembly to GAC, you'll need to do the following:
69
84
70
-
- Open `Developer Command Prompt for VS 2017` (you'll find it in Start menu) **as an Administrator**.
85
+
- Open `Developer Command Prompt for VS` (you'll find it in Start menu) **as an Administrator**.
71
86
- Navigate to the folder of the NuGet package: `cd "C:\PATH_TO_YOUR_SOLUTION\packages\RazorHtmlMinifier.Mvc5.1.2.0\lib\net45"`
72
87
- Install it to GAC: `gacutil /i RazorHtmlMinifier.Mvc5.dll` (it should respond `Assembly successfully added to the cache`)
73
-
- Restart VS 2017 (and maybe also clear any ReSharper caches if you're using that)
88
+
- Restart Visual Studio (and maybe also clear any ReSharper caches if you're using that)
0 commit comments