I suggest that you can create a setup project in visual studio. Then add the ClassLibrary’s project as output into the setup project. For more details, please check out How to: Add and Remove Project Outputs in the File System Editor. After that, the .net framework will be automatically included in the Prerequisites of the setup project.
Open the Prerequisites Dialog Box select the .net framework version of your classlibrary, select “Download prerequisites from the same location as my application” to specify that the prerequisite components are installed from the same location as the application. This copies all the prerequisite packages to the publish location.
Then you can use the setup program when you’re shipping your class library to machine where framework is not installed.