System.IO.FileNotFoundException when using WebGrease via Commandline

799 views Asked by At

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.

2

There are 2 answers

0
rsrobbins On

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.

0
Luca Trazzi On

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