I created a new plugin using the VS2013 project from the guide "How to Debug Your Bot/Plugin/Routine Code In Visual Studio".
Everything worked fine, until i tried to bind my user interface (SettingsGui.xaml) to my JsonSettings implementation (DeathLoggerSettings.cs).
This is the line that causes me problems (line 10 of SettingsGui.xaml) :
Visual studio tells me that "The name "DeathLoggerSettings" does not exist in the namespace "clr-namespace
eathLogger"." I can not seem to find how to solve this error.
Exilebuddy gives me this error:
But my DateContext line can autocomplete just fine, which makes things even weirder.
Why does the compiler tell me that DeathLoggerSettings does not exist when IntelliSense can see it without any problems?
I think that my plugin got somehow linked to the VS2013 project and I don't know how to separate it.
When I use auto complete on the settingsPath, I see (VS2013) beside the namespace, should it be there?
The files in my project are all "File Links", as shown in the guide "How to Debug Your Bot/Plugin/Routine Code In Visual Studio".
Also, the SettingsGui.g.i.cs file that is generated keeps giving me the line
in it's InitializeComponent() method but it should be
I think it is probably linked to my problem.
Everything worked fine, until i tried to bind my user interface (SettingsGui.xaml) to my JsonSettings implementation (DeathLoggerSettings.cs).
This is the line that causes me problems (line 10 of SettingsGui.xaml) :
Code:
<Grid x:Name="Root" DataContext="{x:Static settingsPath:DeathLoggerSettings.Instance}">
Visual studio tells me that "The name "DeathLoggerSettings" does not exist in the namespace "clr-namespace

Exilebuddy gives me this error:
Code:
[OnStartup] A top-level exception has been caught.System.Windows.Markup.XamlParseException: Could not load file or assembly 'VS2013, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'VS2013, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveAssembly(BamlAssembly bamlAssembly)
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlTypeToType(BamlType bamlType)
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
at System.Windows.Baml2006.Baml2006SchemaContext.GetPropertyDeclaringType(Int16 propertyId)
at System.Windows.Baml2006.Baml2006Reader.GetStaticExtensionValue(Int16 valueId, Type& memberType, Object& providedValue)
at System.Windows.Baml2006.Baml2006Reader.Process_PropertyWithExtension()
at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
at System.Windows.Baml2006.Baml2006Reader.Process_BamlRecords()
at System.Windows.Baml2006.Baml2006Reader.Read()
at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
--- End of inner exception stack trace ---
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 DeathLogger.SettingsGui.InitializeComponent() in c:\Users\olibe_000\Desktop\PoEBot\Plugins\DeathLogger\SettingsGui.xaml:line 1
at DeathLogger.SettingsGui..ctor() in c:\Users\olibe_000\Desktop\PoEBot\Plugins\DeathLogger\SettingsGui.xaml.cs:line 25
at DeathLogger.DeathLogger.get_Control() in c:\Users\olibe_000\Desktop\PoEBot\Plugins\DeathLogger\DeathLogger.cs:line 260
at BotGui.Windows.MainWindow.HandleInterfaces(Object obj)
at BotGui.Windows.MainWindow.<OnStartup>b__19()
at System.Windows.Threading.DispatcherOperation.InvokeDelegateCore()
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
at System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
at System.Windows.Threading.Dispatcher.Invoke(Action callback)
at BotGui.Windows.MainWindow.<OnStartup>b__6(Object o)
But my DateContext line can autocomplete just fine, which makes things even weirder.
Why does the compiler tell me that DeathLoggerSettings does not exist when IntelliSense can see it without any problems?

I think that my plugin got somehow linked to the VS2013 project and I don't know how to separate it.
When I use auto complete on the settingsPath, I see (VS2013) beside the namespace, should it be there?

The files in my project are all "File Links", as shown in the guide "How to Debug Your Bot/Plugin/Routine Code In Visual Studio".
Also, the SettingsGui.g.i.cs file that is generated keeps giving me the line
Code:
System.Uri resourceLocater = new System.Uri("/VS2013;component/plugins/deathlogger/settingsgui.xaml", System.UriKind.Relative);
Code:
System.Uri resourceLocater = new System.Uri("/DeathLogger;component/settingsgui.xaml", System.UriKind.Relative);
Attachments
Last edited: