Question

What is the best way to handle specific version of libraries while using MonoDevelop (precisely - use ServiceStack v3 instead of ServiceStack v4)?

Unfortunately, MonoDevelop's addin NuGet does not allow specifying package version (no Package management console support). I've tried hacking it in .csproj and package.config file but it does not work entirely well and it seems to be smelly solution.

One obvious solution is to get rid of NuGet and reference libraries locally after manually downloading them.

How would you solve this problem?

Thanks for all responses :)

Was it helpful?

Solution

Being able to add a specific version of a NuGet package with the MonoDevelop addin is on the todo list.

If you have access to Windows you could use SharpDevelop to add a specific version using its Package Management console.

Or as you have suggested, edit the packages.config file, then restore the packages. However you will need to add the required assembly references by hand. This option is not that bad if there are not that many assembly references and you are not going to be updating the NuGet package very often. Although the benefit of this approach over downloading the NuGet package, extracting it, and directly referencing the assemblies is equivalent and the same amount of work. Also doing it this way you can more easily update the references by simply dropping the new binaries into your lib folder.

Or you could change the source code of the addin. I thought about adding a simple text box where you could specify a particular version. Ideally the dialog would give you a list of available versions.

I would probably just download the ServiceStack assemblies you need and directly reference them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top