Reputation: 257029
i want to have some shared code (code library, controls, utilities, helper classes, etc) in Visual Studio. i do not mean shared assemblies, i mean shared code (i.e. i want to ship one assembly with my application, the executable assembly).
The technique in other development environments way is to have the common source code in a path on my machine, and the IDE is given a list of paths to search for code files.
Visual Studio does not support code search paths.
The back-up hack solution is to copy the source-code over and over into every project. But then in order to keep them all as one version, they are shared in source control. This works well when your source control provider is Microsoft Visual SourceSafe - which supports shared files.
But other source control products (CVS, Subversion, Microsoft Team Foundation Source Save Server, SVN) do not support shared files.
So how does everyone else avoid shipping DLL's with their executable?
Update 1
It is an issue of single file deployment. ClickOnce generates 18 files in 3 folders (i.e. more than one file)
Upvotes: 2
Views: 709
Reputation: 30671
I could propose two solutions:
Upvotes: 3
Reputation: 51
maybe consider having shared assemblies and use a tool like ILMerge during your build process to merge them all to one bug assembly.
Upvotes: 0
Reputation: 2158
At my work we starting to solve this problem using Subversion´s external folders. You just need to put a 'external' property on yor root folder (or any folder), like:
ExternalLib https://yourrepo/SharedLibs/trunk
When you update the project, the folder ExternalLib will be created and populated with the repo´s contents. Any commit will be reflected on the respectively repo.
So, you can make your back-up hack solution works with SVN too =)
Upvotes: 1
Reputation: 2134
We use ClickOnce deployment, which has been very reliable. With ClickOnce, there is conceptually a single object, the application, although many files (including DLLS) are downloaded, although hidden to the user. Shared code is then dealt with through shared projects.
But if you actually physically require just a single file, ClickOnce won't work for you...
Upvotes: 0