How do I use ServiceStack from a strongly named host?
Asked Answered
F

2

8

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...

Filter answered 28/5, 2013 at 14:59 Comment(1)
I just went to through the same process as you, but I didn't get any errors. As long as all the projects and all the dependencies are strongly signed you shouldn't get any errors. Do you any more details on the error you are getting?Macarthur
C
1

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

Cooney answered 22/12, 2013 at 0:51 Comment(0)
H
1

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

Hour answered 3/3, 2017 at 15:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.