Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.IO.FileNotFoundException when using WebGrease via Commandline

I'm trying to use WebGrease 1.6 via command line (also tried Developer Command Prompt for VS2013). When I run "wg options", I'm getting following error (screenshot attached)

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'WebGrease, Version=1.6.5135.21930, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. at WebGrease.Program.Main(String[] args)

error screenshot

I tried on 3 different development machines. Same issue is present on all.

I'm using:

  • WebGrease.1.6.0
  • Visual Studio 2013 Update 3
  • Windows 8.1 (64 bit)

What am I missing? Any help solving this issue is much appreciated.

like image 658
Raj Avatar asked May 01 '26 00:05

Raj


2 Answers

I've been having the same problem. However, if you copy the WebGrease.dll file from the lib folder to the tools folder it will work.

like image 191
rsrobbins Avatar answered May 03 '26 18:05

rsrobbins


for other ppl strugglin in the same problem as us..

you need these dll in the same folder as wg.exe

Antlr3.Runtime.dll

Newtonsoft.Json.dll

like image 26
Luca Trazzi Avatar answered May 03 '26 19:05

Luca Trazzi