Posted 13 years ago by Andre
Version: 11.1.0112
Avatar
I am using the SyntaxEditor DotNet addon for Silverlight.
A lot of the code samples/documentation seem to have a slight towards WPF? (I'm guessing that the WPF version was written first, then ported to SL?)

In any case, I am kind of new to actipro and Silverlight.
What I want to know is, when I add
assem.AssemblyReferences.AddMsCorLib()
what version am I adding? .NET 2?, .NET4? Silverlight 4? SL 3?

I'm not an expert, but I think the classes available vary between the different versions.
Next, when running the code
assem.AssemblyReferences.Add("System.Core")
and this run from inside a xap in a browser, where does it get this from? Is it the reference inside of the xap?

Finally, the end goal is to be able to edit an asp.NET UserControl, both the ascx and a code behind. I want to be able to reference asp.net System.Web.UI.UserControl, NOT (System.Windows.Controls.UserControl, i.e. silverlight UC). In addition, we have a .NET4 assembly we'd also like to have intellisense for. How should that get added?

The main issue I suppose, is, in a silverlight browser app, I want intellisense, for .net4 asp.net.

Thanks

Comments (5)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Andre,

Both the WPF and Silverlight versions are being written at the same time and they do share a codebase. The .NET Languages Add-on in both platforms are nearly identical other than a couple subtle framework things that aren't supported in Silverlight.

The methods like AddMsCorLib and Add("System.Core") will load those assemblies for the currently executing platform. Meaning if you are running this in Silverlight, it will try and load the Silverlight version of those. Silverlight is more constrained than WPF because Silverlight can only load assemblies that are already loaded in the XAP. WPF can try to resolve and look for assemblies in the GAC and other places.

For your scenario, we had made a couple tweaks that will be included in the next version to get the data you need. Silverlight can't load .NET 4 assemblies so what you'd need to do is grab our WPF SyntaxEditor (even an evaluation) and use it to generate reflection cache data files for the assemblies you want to reflect on. Once you grab those you can either include them in your Silverlight application as a resource or provide them some other way such as via a web service. Then we can load those up and you'll have IntelliPrompt on the ASP.NET assemblies, even though you are in Silverlight.

As mentioned above, this functionality will be in the next version. We've updated the .NET Languages Add-on's documentation topic called "Assemblies" with a new section that describes how to load the cache data. Please refer to that once you get the version after it's released.


Actipro Software Support

Posted 13 years ago by Andre
Avatar
Thank you very much for your response.
That helps clear things up and help me in implementing this requirement.

I know you stated that this will be in the next release. I can understand the need to not commit to release schedules, but is there an estimate when I can expect the next release?

We are hoping to integrate this feature this year. Can you give a month when you expect the next release to be released?
Thanks
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Andre,

We're working on the 2011.2 version now, which is what that will appear in. I'd expect it in the next month or two.


Actipro Software Support

Posted 12 years ago by Andre
Avatar

I've downloaded and installed the latest build (2011.2 build 0121) to try the solution as described.

After reading the documentation, trying to understand the issue, downloading WPF, I've got some problems.

grab our WPF SyntaxEditor (even an evaluation) and use it to generate reflection cache data files for the assemblies you want to reflect on.

This is problematic as I don't actually know what you mean. I downloaded and installed, but do I have to write code that to generate the assembly? I tried the sample browser and the Syntax Editor. There was nothing in the browser, the Syntax Editor seems to be for creating languages? not assemblies?  Do I need to create a project that references the WPF to create the cache data? or something else?

Once you grab those you can either include them in your Silverlight application as a resource or provide them some other way such as via a web service

For the actual implementation of using .net4 mscorlib in silverlight (SL). It appears that what is required is for SL to be run as out of browser and/or as a trusted app? Is this true?  If not, what argument to I put in the constructor of the FileBasedAssebmlyRepository to have it work, and where do I stick the results of the WPF Syntax Editor files from the step above?

If not, do I have any options?  The best I can think up of, is to create my own implementation of IAssembly that mimics dotNet4 mscorblib. (and then possibly what ever other assemblies as well, i.e. System.Web).

If that is my only option, can I have IAssemblyDocumentation return null? Can I stub out ToTreeString to be return string.Empty?

Thanks
-Andre

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Andre,

From the quotes you gave, it doesn't appear that you have the latest build.  Those quotes were from build 120 or earlier.  We completely rewrote that portion of the Assemblies topic in build 121 and it walks you through exactly what you need to do.  It should be much more detailed now than what you were reading, and I think will answer your questions.

Please check again and make sure you have build 121 since that is where the updates occurred.  Then if you run through those updated instructions and still have questions, please post back.


Actipro Software Support

The latest build of this product (v18.1 build 0233) was released 4 years ago, which was after the last post in this thread.