Reputation: 628
I have created a Portable Class Library with the help of PCL Contrib. For PCL Contrib to work, I understand you also have to include the appropriate Portable.Platform.dll (platform being Desktop, Silverlight, etc.) in your project that will be utilizing your Portable Class Library. The PCL I have created is going to be redistributed, and I would like to simplify its use by not requiring anybody that uses the PCL to have to include multiple DLLs to make it work. Is there a way I can roll the PCL DLL, the Portable.Platform DLL, and other platform specific abstractions (see PCL Platform Abstraction) into a single DLL per platform?
I want to stay with the PCL to keep the majority of my code in a single manageable area, even though it needs to split out (to some extent) into platform specific packages. I feel this will be re-using as much code as possible.
Upvotes: 0
Views: 359
Reputation: 5772
There's a few different options that I see:
1) You could use ILMerge to do this to merge all the binaries into a single binary. You'd need to change PCLContrib to recognize this new pattern.
2) Grab the source code you need from from PCLContrib, and use as it as implementation detail of your library. Again, you might need slight modifications.
3) Make use of NuGet to make this easier. I'll be putting PCLContrib on NuGet soon, and if your redistributable is simple a NuGet package with a dependency on the PCLContrib package, NuGet will automatically cause the consumer project to reference all the correct binaries.
Upvotes: 1