LicenseHelper threw an exception

LicenseHelper threw an exception
Atom
4/28/2012
FinDirector


Версия dev-ветка, stocksharp-16607. Создал с помощью LicenseTool файл stocksharp_license.xml (лежит в папке с роботом), на этом же компьютере запускаю бота. Ошибка:

  •   ex	{"The type initializer for 'StockSharp.Algo.Licensing.LicenseHelper' threw an exception."}	System.Exception {System.TypeInitializationException}
    

Tags:


Thanks:


Mikhail Sukhov

Avatar
Date: 4/29/2012
Reply


FinDirector: Версия dev-ветка, stocksharp-16607. Создал с помощью LicenseTool файл stocksharp_license.xml (лежит в папке с роботом), на этом же компьютере запускаю бота. Ошибка:

  • ex	{"The type initializer for 'StockSharp.Algo.Licensing.LicenseHelper' threw an exception."}	System.Exception {System.TypeInitializationException}
    

Стек трейс

Thanks:

FinDirector

Avatar
Date: 4/29/2012
Reply


Добавил референс на сборку Microsoft.Practices.ServiceLocation (для exe файла) и заработало, а без этого он не копировался в папку с приложением.

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.FileNotFoundException: Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Не удается найти указанный файл. at Ecng.Configuration.ConfigManager..cctor() --- End of inner exception stack trace --- at Ecng.Configuration.ConfigManager.GetSection() 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, Nullable1 isGetter) at Ecng.Reflection.FastInvoker.<>c__DisplayClass1.<CreateCore>b__0(MemberInfo ) at Ecng.Collections.CollectionHelper.SafeAdd[TKey,TValue](IDictionary2 dictionary, TKey key, Func2 handler) at Ecng.Reflection.FastInvoker.CreateCore(MemberInfo member, Nullable1 isGetter) at Ecng.Reflection.FastInvoker`3.Create(PropertyInfo property, Boolean isGetter) at Ecng.Reflection.ReflectionHelper.GetValue[A,V](MemberInfo member, A arg) at Ecng.Reflection.ReflectionHelper.GetValue[A,V](Type type, String memberName, BindingFlags flags, A arg) at Ecng.Reflection.ReflectionHelper.GetValue[A,V](Type type, String memberName, A 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()

Thanks:

FinDirector

Avatar
Date: 4/29/2012
Reply


Теперь возникает такая ошибка:

System.MissingMethodException was unhandled by user code Message=Method not found: 'Void Ecng.Collections.BlockingQueue1.Enqueue(System.__Canon, Boolean)'. Source=StockSharp.Algo StackTrace: at StockSharp.Algo.Candles.Compression.RealTimeCandleBuilderSource1.Start(CandleSeries series, DateTime from, DateTime to) at #=qkoSo$d923scmg_sYtLvcgJDGgenyR2OwOQSmOMaWOdRZ_iz0whiNpGkiDBoCJI4r1ryZzLcb1QYa_lyTFt55oA==.#=qNsfZgCjM2t9sSyBJQG6_sA==() at StockSharp.Algo.Candles.Compression.CandleBuilder1.#=qyCTQBMh49yPqF$jNoeQvD0QHp84MWLj$2xKpl5gnhYY=.#=qs8p6GN_7UHa_1rIO$Fi4zA==() at StockSharp.Algo.Candles.Compression.CandleBuilder1.Start(CandleSeries series, DateTime from, DateTime to) at StockSharp.Algo.Candles.Compression.TimeFrameCandleBuilder.Start(CandleSeries series, DateTime from, DateTime to) at #=qkoSo$d923scmg_sYtLvcgJDGgenyR2OwOQSmOMaWOdRZ_iz0whiNpGkiDBoCJI4r1ryZzLcb1QYa_lyTFt55oA==.#=qNsfZgCjM2t9sSyBJQG6_sA==() at StockSharp.Algo.Candles.CandleManager.Start(CandleSeries series, DateTime from, DateTime to) at StockSharp.Algo.Candles.CandleHelper.Start(ICandleManager manager, CandleSeries series) at FinDirector.Algo.Strategies.FoolStrategy.OnStarting() in D:\Projects\FinDirector\branches\S#41\FinDirector.Algo\Strategies\FoolStrategy.cs:line 73 at StockSharp.Algo.Strategies.Strategy.#=qhCOWQSPyQ50AtJVAHPmuZ$RkaMvUAYiKRZtcbR8lCd0=(ProcessStates #=qzr55ep1Q_tdNk3wYz1P3uQ==) at StockSharp.Algo.Strategies.Strategy.Start() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() InnerException:

Thanks:

Mikhail Sukhov

Avatar
Date: 4/30/2012
Reply


Обновите полностью сборки S#.

Thanks:

FinDirector

Avatar
Date: 4/30/2012
Reply


Спасибо, заработало.

Thanks:


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

loading
clippy