Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use ServiceStack from a strongly named host?

I have a code base which requires strong names.

At first, I thought this was going to be an easy fix, as I simply assigned strong names to the ServiceStack assemblies I needed. This failed due to inter-dependencies within ServiceStack on weak named assemblies. Then, I bit the bullet and recompiled ServiceStack using my key file - which was undesirable as I didn't see a means by which this could be done in a single location and had to add it to each project.

Even then, the solution failed to build with the tests due to this:

[assembly: InternalsVisibleTo("ServiceStack.Common.Tests")]

I'm finding myself in a downward spiral of having to tweak things to get them to work and taking myself further and further away from source libraries I'd like to keep updated.

How should I approach this problem? I don't like where this is going...

like image 267
Hotrodmonkey Avatar asked May 28 '13 14:05

Hotrodmonkey


2 Answers

It may not solve your problem, as this is not 100% reliable (although, if it works fine on one host it will work on all hosts - so if you have good test coverage you can at least make sure it worked fine).

LibZ (disclaimer: LibZ.Author = Me) has a function sign-and-fix which finds unsigned assemblies, traverses assembly tree bottom-up and replaces all assembly references to this "new" signed assemblies.

Link: https://libz.codeplex.com/wikipage?title=Signing%20assemblies&referringTitle=Documentation

like image 179
Milosz Krajewski Avatar answered Nov 19 '22 13:11

Milosz Krajewski


Could you just the signed version that is available in nuget? ServiceStack.Signed

like image 37
Henry Crans Avatar answered Nov 19 '22 15:11

Henry Crans