Ошибка при запуске примера SampleConnection

Ошибка при запуске примера SampleConnection
Atom
08.10.2021
Sprite


Добрый день!

Пытался обновиться с Nuget, получил ошибку при запуске приложения, скачал архив с GitHub, запустил проект SampleConnection. И получил точно такую же ошибку:

System.Windows.Markup.XamlParseException: 'Не удалось создать "EnumType" на основе текста "common:CurrencyTypes".' Inner Exception: XamlParseException: Префикс "common" не сопоставлен с пространством имен.

image4107.png

image7425.png

at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at SampleConnection.SecuritiesWindow.InitializeComponent() in C:\Temp\S#\StockSharp-master\Samples\Connectors\SampleConnection\SecuritiesWindow.xaml:line 1

Можете подправить?

image4107.png 105 KB (1125) image7425.png 104 KB (1055)



Спасибо:


Алексей

Фотография
Дата: 08.10.2021
Ответить


Я скачивал с помощью S#.Installer, SampleConnection у меня запускается, а вот SampleStrategies не выставляет заявки

Спасибо:

William B

Фотография
Дата: 08.10.2021
Ответить


sprite: Добрый день!

Пытался обновиться с Nuget, получил ошибку при запуске приложения, скачал архив с GitHub, запустил проект SampleConnection. И получил точно такую же ошибку:

System.Windows.Markup.XamlParseException: 'Не удалось создать "EnumType" на основе текста "common:CurrencyTypes".' Inner Exception: XamlParseException: Префикс "common" не сопоставлен с пространством имен.

image4107.png

image7425.png

at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at SampleConnection.SecuritiesWindow.InitializeComponent() in C:\Temp\S#\StockSharp-master\Samples\Connectors\SampleConnection\SecuritiesWindow.xaml:line 1

Можете подправить?

Добрый день, на последнем релизе все должно работать. Пробуйте пожалуйста.

Спасибо:

Sprite

Фотография
Дата: 08.10.2021
Ответить


Юрий, добрый день!

Ошибка XAML больше не показывается, приложение SampleConnection запустилось. И выдало новую ошибку

SampleConnection 08.10.2021 20:32:56 +03:00 Error System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for '#=zKZ3pQfy60PBJ9KEnUCXz6fO4P6ux35H6xQ==' threw an exception. ---> System.MissingMethodException: Method not found: 'System.String StockSharp.Localization.LocalizedStrings.get_WshMeta()'. at #=zKZ3pQfy60PBJ9KEnUCXz6fO4P6ux35H6xQ==..cctor() --- End of inner exception stack trace --- at StockSharp.InteractiveBrokers.InteractiveBrokersMessageAdapter..ctor(IdGenerator transactionIdGenerator) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at Ecng.Common.TypeHelper.CreateInstance(Type type, Object[] args) at StockSharp.Messages.Extensions.CreateAdapter(Type adapterType, IdGenerator idGenerator) in C:\Temp\S#\StockSharp-master\Messages\Extensions.cs:line 1534 at StockSharp.Configuration.InMemoryMessageAdapterProvider.<>c__DisplayClass0_0.<.ctor>b__0(Type t) in C:\Temp\S#\StockSharp-master\Configuration\InMemoryMessageAdapterProvider.cs:line 35

Затем, после настройки коннектора и соединения в SampleConnection портфели пустые. Т.е. нажав на кнопку "Портфель" мы ничего не видим. А мое приложение при попытке синхронизировать портфели выдает вот такую ошибку:

Application 08.10.2021 20:57:08 +03:00 Error System.InvalidOperationException: Сообщение 'PositionChange,T(L)=2021/09/24 21:25:30.000,Offline=Ignore,T(S)=2021/10/08 20:57:01.061,Sec=MONEY@ALL,P=1NGKE/1NGKE,CL=,L=,Changes=[BeginValue, XXXXXXXXX],[CurrentValue, XXXXXXXXX]' привело к ошибке обработки. ---> System.MissingMethodException: Method not found: 'StockSharp.Messages.SecurityId StockSharp.Messages.Extensions.ToSecurityId(System.String, StockSharp.Messages.SecurityIdGenerator)'. at #=zgC1u2niVVYTPQl8i0w==..ctor(Position #=z2Frq3yQ=, Action1 #=ziNvQbGQ=) at StockSharp.Xaml.PortfolioGrid.#=z552NRg8=.#=zxpyx$pkufkgJqrTUyw==(Position #=zl$8T$Qw=, Action1 #=z8L0bGMU=) at #=zt0X6pcolWad5Eif5fiQbzAzhnX09zG47FGBN3rw=.#=z_AuS7y3_Ua7RpCSiGw==.#=zUv0r35RICvoqPZxAWw==(#=zumWTMD0= #=zVetCjME=) at #=zqa7rTY84WF9I6UPsH_RHNoo=.Add(#=zYKYUK9Y= #=z37A1PzY=) at Ecng.Collections.CollectionHelper.<TryAdd>g__InternalTryAdd|12_0(<>c__DisplayClass12_01& ) at Ecng.Collections.CollectionHelper.TryAdd(ICollection1 collection, T value) at Algo.Application.MainWindow.<AttachConnectorEvents>b__17_5(Subscription s, Position position) in C:\Temp\S#\Robots\Algo.Application\MainWindow.xaml.cs:line 460 at StockSharp.Algo.Connector.RaiseReceived[TEntity](TEntity entity, IEnumerable1 subscriptions, Action2 evt, Nullable1& anyCanOnline) in C:\Temp\S#\StockSharp-master\Algo\Connector_Raise.cs:line 973 at StockSharp.Algo.Connector.RaiseReceived[TEntity](TEntity entity, ISubscriptionIdMessage message, Action2 evt, Nullable1& anyCanOnline) in C:\Temp\S#\StockSharp-master\Algo\Connector_Raise.cs:line 948 at StockSharp.Algo.Connector.RaiseReceived[TEntity](TEntity entity, ISubscriptionIdMessage message, Action2 evt) in C:\Temp\S#\StockSharp-master\Algo\Connector_Raise.cs:line 943 at StockSharp.Algo.Connector.ProcessPositionChangeMessage(PositionChangeMessage message) in C:\Temp\S#\StockSharp-master\Algo\Connector_ProcessMessage.cs:line 1103 at StockSharp.Algo.Connector.OnProcessMessage(Message message) in C:\Temp\S#\StockSharp-master\Algo\Connector_ProcessMessage.cs:line 642 --- End of inner exception stack trace ---

А при попытке посмотреть стакан по какому-нибудь инструменту SampleConnection выдает вот такую ошибку:

System.Windows.Markup.XamlParseException: '"Не обнаружено подходящего конструктора для типа "StockSharp.Xaml.MarketDepthControl". Можно использовать директивы Arguments или FactoryMethod для формирования этого типа.": номер строки "6" и позиция в строке "3".' InnerException MissingMethodException: Method not found: 'StockSharp.Messages.Sides StockSharp.Messages.Extensions.Invert(StockSharp.Messages.Sides)'.

Стек: System.Windows.Markup.XamlParseException: "Не обнаружено подходящего конструктора для типа "StockSharp.Xaml.MarketDepthControl". Можно использовать директивы Arguments или FactoryMethod для формирования этого типа.": номер строки "6" и позиция в строке "3". ---> System.MissingMethodException: Method not found: 'StockSharp.Messages.Sides StockSharp.Messages.Extensions.Invert(StockSharp.Messages.Sides)'. at StockSharp.Xaml.MarketDepthControl.#=zxDcwRhtyWNkY(Int32 #=zzahPLws=) at StockSharp.Xaml.MarketDepthControl..ctor() at MarketDepthControlCtor(Object[] ) at MS.Internal.Xaml.Runtime.DynamicMethodRuntime.CreateInstanceWithCtor(Type type, Object[] args) at MS.Internal.Xaml.Runtime.DynamicMethodRuntime.CreateInstanceWithCtor(XamlType xamlType, Object[] args) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType, Object[] args) --- End of inner exception stack trace --- at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at SampleConnection.QuotesWindow.InitializeComponent() in C:\Temp\S#\StockSharp-master\Samples\Connectors\SampleConnection\QuotesWindow.xaml:line 1 at SampleConnection.QuotesWindow..ctor() in C:\Temp\S#\StockSharp-master\Samples\Connectors\SampleConnection\QuotesWindow.xaml.cs:line 16 at SampleConnection.SecuritiesWindow.SubscribeDepths(DepthSettings settings) in C:\Temp\S#\StockSharp-master\Samples\Connectors\SampleConnection\SecuritiesWindow.xaml.cs:line 313 at SampleConnection.SecuritiesWindow.DepthClick(Object sender, RoutedEventArgs e) in C:\Temp\S#\StockSharp-master\Samples\Connectors\SampleConnection\SecuritiesWindow.xaml.cs:line 245 at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

image4897.png

image4897.png 26 KB (982)
Спасибо:


Добавить файлы через драг-н-дроп, , или вставить из буфера обмена.

loading
clippy