I have a standard \"class library\" project with a set of classes that I use to import in almost all my new projects.
The way I work is creating a new Solution with
You can embedd your Assembly
(.dll in your case) into your project by selecting "Add existing file" and then change the Build Option to "Embedded Ressource".
You then add a Handler
for the AppDomain.CurrentDomain.AssemblyResolve
event which gets fired as soon as you first access the library inside your code.
That handler code looks like this: (Notice the fully qualified assembly path inclusive correct namespacs. I'd wrap it in a function which gets called on startup of your application.
AddHandler AppDomain.CurrentDomain.AssemblyResolve,
Function(sender As Object, args As System.ResolveEventArgs) As System.Reflection.Assembly
Dim ressourceName = "YourNamespace.YourSubNamespace." + New AssemblyName(args.Name).Name + ".dll"
Using stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(ressourceName)
Dim assemblyData(CInt(stream.Length)) As Byte
stream.Read(assemblyData, 0, assemblyData.Length)
Return Assembly.Load(assemblyData)
End Using
End Function
You can then deploy your tool without any additional files.