Hi guys, I'm pretty sure I want this "thing" to work at the source code
level, not at the binary reference level. I said I could put all the
snippets in DLLs, but I would finish up with dozens of them, each contain
maybe only 10 lines of code (I have my own local Nuget package source for
testing).

This mention of SVN externals and Git modules sounds like it's heading in
the right direction. I personally avoid Git (that's another story), but I a
quick search about Mercurial "externals" or "subreprositories" shows a few
confusing overviews
<http://www.fogcreek.com/kiln/training/using-mercurial-subrepositories/>
that might clarify it if works the way I want. I'll report if I find
anything useful. It'd be great if you could something like this, but this
is where I suspect a VS extensions would be required to implement it.

#region Snippet: My Snazzy Snippet
:
// code would be "included" here
:
#endregion

*GK*

On 19 January 2016 at 07:19, David Smith <dav...@nzcity.co.nz> wrote:

> Hi Greg,
>
>
>
> Could you use your version control software to do this?
>
> SVN has externals & Git has  submodules.  Perhaps these mechanisms could
> do what you want?
>
>
>
> David
>
>
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Greg Keogh
> *Sent:* Tuesday, 19 January 2016 12:58 a.m.
> *To:* ozDotNet <ozdotnet@ozdotnet.com>
> *Subject:* Code snippets
>
>
>
> Folks, I'm looking for a way of managing snippets of code that I want to
> include in multiple unrelated projects. I want them to behave like little
> Nuget packages of source code, so when I update snippets in one project
> they will be recognised as out-dated when I open other projects using them.
>
>
>
> You can get this sharing effect by adding files "as link" in multiple
> projects, but then the projects get mixed up with your local file system.
> Putting the snippets in a utility DLL is technically correct, but far too
> heavy handed for me.
>
>
>
> Is anyone aware of some facility that does what I want? A VS plugin would
> probably be the way to go, but they're really taxing and specialised to
> write. Maybe there are other ways.
>
>
>
> *Greg K*
>

Reply via email to