I wonder is there a way to source link files so that the class inside a file gets project-specific unique namespace…
Well you could use preprocessor directives:
#if PROJECT_FOO
namespace Foo
#elif PROJECT_BAR
namespace Bar
#elif PROJECT_BAZ
namespace Baz
#endif
... and then link the file into each project, defining appropriate symbols in the project properties.
But I would thoroughly recommend against it. It's horrible, and it's certainly not how C# was designed to be written.
Just break it out into a separate project - you're bound to find you want more and more code like this anyway.