Posted 13 years ago
by Mike Pavlov
-
Terrasoft

Hello!
We wanna to buy your latest version of SyntaxEditor .NET Languages Add-on (for Silverlight), but before it we need to be shore, that we can simply add refences to external libraries for Intellisence features
According to this forum and Actinpro Silverlight Studio Documentation, I took latest version of WPF SyntaxEditor for generate type info for my libraries
First problem - I can't find any where instructions for generating type info. I tried to do this next way:
1) I opened solution of WPF SampleBrowser for VS2010 (C# version), changed framework for the project to 4.0 (after downloading your project for VS2010 where set to 3.5 framework by default)
2) Included target library to project references
3) Compiled project
4) Goto obj/Debug folder and took generated ResolveAssemblyReference.cache file
After that I included this cache file to my Silverlight project as embedded resource and in DotNetProjectAssemblyReferenceLoader(object sender, DoWorkEventArgs e) method inserted next codebut, my experiment was a failure - in command serializer.LoadFromStream(null, stream) I got NullReferenceException
In debugging I test, that stream variable was not null - so now i don't know - how to get correct result and where were my error
Any way - we need more flexible way to generate type info than the manual loading through WPF version of syntax editor
We wanna to buy your latest version of SyntaxEditor .NET Languages Add-on (for Silverlight), but before it we need to be shore, that we can simply add refences to external libraries for Intellisence features
According to this forum and Actinpro Silverlight Studio Documentation, I took latest version of WPF SyntaxEditor for generate type info for my libraries
First problem - I can't find any where instructions for generating type info. I tried to do this next way:
1) I opened solution of WPF SampleBrowser for VS2010 (C# version), changed framework for the project to 4.0 (after downloading your project for VS2010 where set to 3.5 framework by default)
2) Included target library to project references
3) Compiled project
4) Goto obj/Debug folder and took generated ResolveAssemblyReference.cache file
After that I included this cache file to my Silverlight project as embedded resource and in DotNetProjectAssemblyReferenceLoader(object sender, DoWorkEventArgs e) method inserted next code
var serializer = new BinaryAssemblySerializer();
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SLProjectName.ResolveAssemblyReference.cache")) {
var assembly = serializer.LoadFromStream(null, stream);
if (assembly != null) {
_projectAssembly.AssemblyReferences.Add(assembly);
}
}
In debugging I test, that stream variable was not null - so now i don't know - how to get correct result and where were my error
Any way - we need more flexible way to generate type info than the manual loading through WPF version of syntax editor