Posted 13 years ago
by Jake Pearson
-
Software Developer,
Alion Science and Technology

Hi,
I'm porting an application from SyntaxEditor for WinForms to SyntaxEditor for WPF. I got all the compiler errors taken care of. During startup, I call this function:It crashes on project.AssemblyReferences.Add when it tries to add in one of my dlls. It is able to get through system dlls. Here is the stack trace:
Please let me know if you need more information:
thanks,
Jake
[Modified at 02/17/2012 10:19 AM]
I'm porting an application from SyntaxEditor for WinForms to SyntaxEditor for WPF. I got all the compiler errors taken care of. During startup, I call this function:
public static void Startup(IEnumerable<string> extraReferences)
{
AmbientParseRequestDispatcherProvider.Dispatcher = new ThreadedParseRequestDispatcher();
var appDataPath = Path.Combine(UserInterfaceHelper.UserDataPath + "\\Assembly Repository");
AmbientAssemblyRepositoryProvider.Repository = new FileBasedAssemblyRepository(appDataPath);
var project = StaticLanguage.GetService<IProjectAssembly>();
var assemblyLoader = new BackgroundWorker();
assemblyLoader.DoWork += (sender, e) =>
{
project.AssemblyReferences.AddMsCorLib(); // MsCorLib should always be added at a minimum
foreach (var reference in extraReferences)
{
project.AssemblyReferences.Add(reference);
}
};
assemblyLoader.RunWorkerAsync();
}
mscorlib.dll!System.Reflection.AssemblyName.AssemblyName(string assemblyName) + 0x51 bytes
ActiproSoftware.Text.Addons.DotNet.Wpf.dll!#Grc.#8rc.#BFc(string assemblyName) + 0xc0 bytes
ActiproSoftware.Text.Addons.DotNet.Wpf.dll!ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.AssemblyRepositoryBase.Load(string fullName) + 0x60 bytes
ActiproSoftware.Text.Addons.DotNet.Wpf.dll!#Grc.#tsc.Add(string fullName) + 0x4f bytes
> MAAD.Utilities.CodeEditor.dll!MAAD.Utilities.CodeEditor.CSharpEditorWPF.Startup.AnonymousMethod__0(object sender, System.ComponentModel.DoWorkEventArgs e) Line 156 + 0x1b bytes C#
System.dll!System.ComponentModel.BackgroundWorker.OnDoWork(System.ComponentModel.DoWorkEventArgs e) + 0x7b bytes
System.dll!System.ComponentModel.BackgroundWorker.WorkerThreadStart(object argument) + 0x50 bytes
thanks,
Jake
[Modified at 02/17/2012 10:19 AM]