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?
How do you reference third party assemblies in WebMatrix?
I should add that this doesn't seem to work for older Interop COM objects. What I ended up doing to get around it, was add the COM object to a Visual Studio project and compile it...then copied the Interop.MyComObject to the bin folder of the WebMatrix project...so far that seems to work. –
Anna
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.
© 2022 - 2024 — McMap. All rights reserved.