Storing class files in dll and using the dll for multiple websites in asp.net
I want to create a class file in VS2005 and be able to use it in other websites on my computer / production server. How do I c开发者_如何学Pythonreate this dll and store it in a common place where I can reference it while developing and also on the production server ?
Avoid the GAC unless you have full administration rights on the host server.
What you could do is create a project containing the source for your shared DLL. You can then add this project into each of your web site solutions, and add a reference in your site solutions to the project. This has the added advantage of enabling you to step into your shared source during debugging.
First add a class library project to your solution. Add this class into this library. And deploy this class to Global Assembly Cache (GAC). You can follow these steps to install your assembly to GAC.
精彩评论