Click here to Skip to main content
15,886,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Ok, so I used to program years ago. I remember that, at one point, I created an executable or an assembly or a DLL or whatever it was called, out of my solution/project. It was something minor and not complicated. Anyway, I simply grabbed that DLL file or whatever it was and moved it to my hosting and when I went to the folder of that file, the executable executed and everything worked on the web as expected.

It's been about 4 years later and I have not used VS in a long time, much less VS2012, which I'm using now. So, how do I go about creating this DLL or assembly or whatever it was I created 4 years ago (I'm almost sure it was a dll assembly)? If anyone could point me in the right direction, I'll appreciate it.

Thanks
Posted

1 solution

You don't create a DLL from a solution (or even an EXE file) - you create these from a Project within a solution.
So a Solution may contain three Projects, which generate an EXE and two DLL files.

To create a DLL from a project is easy: Add the Project to your Solution by right clicking the solution name in the Solution Explorer pane and selecting "Add...New Project...". In the resulting dialog, select "Class Library" from the middle panel and give it an appropriate name. Press OK.

When you build the project (or solution) the DLL file will be created automatically. (You may want to add a reference to the DLL project in any EXE project in order to use the classes and methods you create)


"OriginalGriff, but where are these DLL files? As I mentioned, I just want to move whichever DLL or executable file I need to a hosting site where the user can simply go to a particular URL and the file will be executed and it'll be run.

Thanks"



If you are genuinely talking about URLs (and hence a location on the internet) then that's rather more complex - the user can't run a file on a remote computer as easily as on his own (if nothing else to stop malicious running of programs you don't want run by people you don't want to run them!). Instead, programs are run on URLs via websites - which isn't difficult to arrange, but needs a different way of thinking.

If you are just using the term "URL" wrong, and the user can navigate to the folder in which the file will be contained, then a "normal" exe file will be created in your Solution folder under a directory structure. So, if your Solution is called "MyWallet" and it is created in "D:\MyProjects", with an EXE Project "MyExe" and a DLL project "MyDLL" then:
D:\My Projects\MyWallet\MyExe\bin\Debug
Will hold the debug EXE file
D:\My Projects\MyWallet\MyExe\bin\Release
Will hoild the release version.
And
D:\My Projects\MyWallet\MyDLL\bin\Debug
D:\My Projects\MyWallet\MyDLL\bin\Release
Will hold the same for the DLL files.
If you aren't sure where these paths are in your system, then:
1) Right click your project name in VS and select "Properties".
2) Look at the "Build" tab, and near the bottom is the "Output Path".
3) Press the "Browse" button and a Windows Explore window will open letting you see the path.
 
Share this answer
 
v2
Comments
Ranjan.D 29-Oct-13 12:56pm    
5+ , Better than MSDN Doc :)
TheAbominable 30-Oct-13 5:47am    
Ok, so all I want is for the user to go to www.blahblahbla.com (I already have a domain and hosting service that supports .net) and the web program/website (pages) I created, along with its functionality (which does not depend on a database) start running on the web and my friend can use the website (which IN MY COMPUTER is a solution composed of 2 projects), along with its functionality. I remember creating a project/website that had a calculator (years ago) and I simply extracted the dll or something like that and moved that file to my hosting. Please advise. THANKS!
OriginalGriff 30-Oct-13 6:06am    
Use Visual Studio to publish it direct to the website - it will compile it and move the appropriate files for you.
TheAbominable 29-Oct-13 21:59pm    
OriginalGriff, but where are these DLL files? As I mentioned, I just want to move whichever DLL or executable file I need to a hosting site where the user can simply go to a particular URL and the file will be executed and it'll be run.

Thanks
OriginalGriff 30-Oct-13 4:31am    
Answer updated

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900