Try our conversational search powered by Generative AI!

Using EPiServer.dll in a general assembly

I want to create an assembly with general code to be shared between different episerver-installations. Like common properties, dataabstractions, webservices etc. What is the best way to do this since I need to add EpiServer.dll as an reference.
Mar 20, 2006 12:48
I usaually install a EPiServer sample site. Create a Class Library project in that sample site. Because VS not will allow you to create the projekt in the same folder as a nother projekt exists there is two options, delete EPiServerSample.csproj or create the new one in a subdirectory. I usually go for the later because it's neat to have when testing your component. I delete the useless Class.cs and close the VS project. Opening Explorer and move my project files to the root of the sample site, VS doesn't have any problem with that! Then it's time to open the project from that location and set the build output path to /bin and some fixing, let Assembly.cs stay in the subfolder and include it in the project. Why do I move the project to the root? It makes it possible for me to include files in other folders that belongs to the EPi structure. Example /lang, /styles, /bin and so on... Now yore ready to create a control that lives in the EPi structure. One thing, if you want a aspx or ascx-file in your control open the EPiServerSample.csproj create the file there, exclude it from that project and include it in your controls project. Hope this helps! /HAXEN
Mar 21, 2006 8:30
Hi, extracting code into your own library project is a good idea. I do it all the time. The way I use library projects is almost the same way that Håkan explains, but I keep my library project source code outside the web project, using build events to make the magic work. See my blog for an in-depth explanation on why and how to do this: /Steve
Mar 21, 2006 18:13
Hi Haxen, I've answered your comment on my blog. Sorry for the late response. /Steve
Mar 28, 2006 19:59
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.