UiPath throws Bad IL Request when its compiling the activities

I closed UiPath Studio, then deleted the .nuget folder under that specific user that the error is referring to and then restarted the UiPath Studio. That fixed my problem.