在我的ServiceStack 客户端应用程序中,一切都很好,直到我尝试用SmartAssembly或ILRepack打包它。有三个DLL:(ServiceStack.Client.dll、ServiceStack.Interfaces.dll、ServiceStack.Text.dll),它们在打包时会导致我的应用程序崩溃,不管我是使用加密\混淆选项还是将它们打包到一个EXE中。我的应用程序的目标是.NET 4.0 (我想支持win XP)。异常的堆栈跟踪是:
ServiceStack.LicenseException: Unauthorized access request of a licensed feature. Type: 'AccessToken', Assembly: 'ClientTester.exe', 'My EXE path'
ServiceStack.Net40PclExport.VerifyInAssembly(Type accessType, ICollection`1 assemblyNames)
ServiceStack.LicenseUtils.RequestAccess(Object accessToken, LicenseFeature srcFeature, LicenseFeature requestedAccess)
ServiceStack.JsonServiceClient.ToJson[T](T o)
ServiceStack.EncryptedServiceClient.CreateEncryptedMessage(Object request, String operationName, Byte[] cryptKey, Byte[] authKey, Byte[] iv, String verb)
ServiceStack.EncryptedServiceClient.Send[TResponse](String httpMethod, Object request)我无法安装补丁,因为安装程序说它被阻塞了,或者条件无效。此外,我不确定这个补丁是否会帮助我。任何想法都欢迎。
Sidenote:另一个ServiceStack应用程序,它使用除上述DLL之外的其他ServiceStack DLL,即使打包后也能正常工作。
发布于 2016-03-07 07:08:05
看起来,没有显式安装的.NET Framework4.0就导致了这个问题。如果我为4.5\4.6版本编译解决方案并打包它--一切都很好。还为.NET 4.0编译和打包它,并在已显式安装此版本的PC上使用它也能工作
https://stackoverflow.com/questions/35827837
复制相似问题