Проблема с лицензией в 4.1.17

Проблема с лицензией в 4.1.17
Atom
8/5/2013
vk37


При попытке подключения к серверу брокера дает ошибку: "The type initializer for 'StockSharp.Algo.Licensing.LicenseHelper' threw an exception." Лицензию обновил. Смартком 3.0


Tags:


Thanks:


Mikhail Sukhov

Avatar
Date: 8/5/2013
Reply


Смотреть нужно InnerException

Thanks:

vk37

Avatar
Date: 8/5/2013
Reply


Ошибка: :::spoiler

System.TypeInitializationException: The type initializer for 'StockSharp.Algo.Licensing.LicenseHelper' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Ecng.Security.CryptoAlgorithm' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Ecng.Reflection.Emit.AssemblyHolder' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Ecng.Configuration.ConfigManager' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at Ecng.Configuration.ConfigManager..cctor()
   --- End of inner exception stack trace ---
   at Ecng.Configuration.ConfigManager.GetSection[T]()
   at Ecng.Reflection.Emit.AssemblyHolder..cctor()
   --- End of inner exception stack trace ---
   at Ecng.Reflection.Emit.AssemblyHolder.get_NeedCache()
   at Ecng.Reflection.FastInvoker.CreateDelegate(Type delegType, Type instanceType, Type argType, ConstructorInfo ctor, MethodInfo method, MemberInfo member, Nullable`1 isGetter)
   at Ecng.Reflection.FastInvoker.<>c__DisplayClass1.<CreateCore>b__0(MemberInfo param0)
   at Ecng.Collections.CollectionHelper.SafeAdd[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`2 handler, Boolean& isNew)
   at Ecng.Collections.CollectionHelper.SafeAdd[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`2 handler)
   at Ecng.Reflection.FastInvoker.CreateCore(MemberInfo member, Nullable`1 isGetter)
   at Ecng.Reflection.FastInvoker.Create(PropertyInfo property, Boolean isGetter)
   at Ecng.Reflection.FastInvoker`3.Create(PropertyInfo property, Boolean isGetter)
   at Ecng.Reflection.ReflectionHelper.GetValue[TArg,TValue](MemberInfo member, TArg arg)
   at Ecng.Reflection.ReflectionHelper.GetValue[TArg,TValue](Type type, String memberName, BindingFlags flags, TArg arg)
   at Ecng.Reflection.ReflectionHelper.GetValue[TArg,TValue](Type type, String memberName, TArg arg)
   at Ecng.Security.CryptoAlgorithm..cctor()
   --- End of inner exception stack trace ---
   at Ecng.Security.CryptoAlgorithm.Create(AlgorithmTypes type, ProtectedKey[] keys)
   at StockSharp.Algo.Licensing.LicenseHelper..cctor()
   --- End of inner exception stack trace ---
   at StockSharp.Algo.Licensing.LicenseHelper.IsLicenseSupport(Type featureType)
   at StockSharp.Algo.BaseTrader.Connect()
ServiceLocation.png 45 KB (420)
Thanks:

Mikhail Sukhov

Avatar
Date: 8/5/2013
Reply


Оригинальный проект https://commonservicelocator.codeplex.com/ Там публичный токен 31bf3856ad364e35 Судя по всему MVVM Gala своим ключом подписали.

Thanks:

vk37

Avatar
Date: 8/5/2013
Reply


Обновил проект MVVM Light через NuGet. Сейчас разработчики MVVM Light берут сборку Microsoft.Practices.ServiceLocation из официального пакета: https://www.nuget.org/packages/CommonServiceLocator/1.0. Это то же самое, что и здесь: https://commonservicelocator.codeplex.com/. Не понимаю происхождение сборки из S# :)

ServiceLocation.png 75 KB (401)
Thanks:

Mikhail Sukhov

Avatar
Date: 8/5/2013
Reply


vk37: Не понимаю происхождение сборки из S# :)

Сами перекомпилировали под .NET 4.0 Так же как и MVVM. Проект мертвый, но своего мини функционала хватает, чтобы не поддерживать его вообще.

Thanks:

vk37

Avatar
Date: 8/5/2013
Reply


Пока как-то так ):::spoiler

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Practices.ServiceLocation" culture="neutral" publicKeyToken="null" />
        <codeBase version="1.0.0.0" href="Microsoft.Practices.ServiceLocation.StockSharp.dll"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Thanks: Mikhail Sukhov


Attach files by dragging & dropping, , or pasting from the clipboard.

loading
clippy