Often times a developer on my team will create a new Visual Studio project and reference a DLL somewhere on their local machine (e.g., C:\mydlls\homersimpson\test.dll). Then, when I get the project from the source control repository, I cannot build the project because I do not have the referenced dll in the exact same location on my machine.
What is the best practice for storing and referencing shared libraries?
Some companies have a policy to put commonly used assemblies (DLL's) into source control. If you own the source code, this should never be done. These assemblies should be built during the build process.
Dll files are located in C:\Windows\System32.
Using DLL File Step 1 - Open Visual Studio then select "File" -> "New" -> "Project..." then select "Visual C#" -> "Windows Forms application". Step 2 - Design the form as in the following image: Step 3 - Add a reference for the dll file, "calculation. dll", that we created earlier.
I typically create a lib folder in my project, where I put the referenced dll's. Then I point the reference to the dll in the lib folder. This way, every developer can build the project after retrieving from source control.
If it's a project that was built in house, you could also add that project to your solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With