Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you reference third party assemblies in WebMatrix?

Tags:

.net

webmatrix

I have a DLL from a vendor, and I'd like to use it in my .cshtml files. I can't see where you add references to assemblies in Webmatrix though...or am I missing the point completely?

like image 606
Webjedi Avatar asked Jan 14 '11 23:01

Webjedi


1 Answers

Create a bin folder in your site and copy it to there. WebMatrix doesn't provide a way to add references in the same way as VS. You need to add a using statement at the top of the CSHTML file:

@using MyThirdParty.Component;

No, you are not missing the point. I can see users of WebMatrix wanting to play with iTextSharp or similar.

like image 74
Mike Brind Avatar answered Oct 05 '22 14:10

Mike Brind