How to include a visual c++ .lib in Silverlight - silverlight

It is possible to include a visual c++ 2005 .lib in a Silverlight project?
I wrote an ActiveX that includes a library written in visual c++ 2005, and now I want create a Silverlight plugin for cross-browser portability.

Unfortunately the only managed runtimes supported by silverlight is c# and Vb.net so no c++ :-(.
Silverlight will however support PInvoke in version 5 but there are some tricks to it that might not fit with your usecase. It does however require elevated trust.

Probably not, Silverlight is very limited. But with the release of Silverlight 5 there seems to be support for PInvoke.
http://www.microsoft.com/silverlight/future/ Quite a bit down on the page.
Silverlight 5 is released later this year.

Related

silverlight for wince6.0

hello
i want to build silverlight application for wince6.0. im not getting whether we have to use vs2008 r expression blend can you tel me which one is suitable to build for wince6.0
Silverlight "sort of" exists for Windows CE (see here: http://msdn.microsoft.com/en-us/library/ee502198.aspx ) but it's a version programmed via C++ that is, in many substantial ways, different from the Silverlight on a desktop PC, Mac, or Windows Phone 7.
I do not believe there is Blend support for this version of Silverlight, and the Visual Studio support is pretty limited. In fact, the whole framework is rather limited, as it's based on Silverlight 2, which is starting to feel pretty old at this point.
That said, hopefully the above link helps point you to samples and other documentation that can help.
Sorry, Silverlight doesn't support Windows CE 6.0. You can use the .NET Compact Framework instead, but it doesn't get you XAML or the other cool things that you might have been hoping for from Silverlight.

DLR Scripting within Silverlight 4 Application

I would like to add some scripting support to a Silverlight 4 application that I'm working on. I have the latest stable releases of both IronRuby and IronPython installed on my machine with Visual Studio 2010. I looked at some samples of using the ScriptEngine class with both IronRuby and IronPython. I even got it to work in a small Windows Forms app to make sure my code works. However, I can't seem to Add Reference for the required Assemblies/DLLs to my Silverlight 4 application.
Here's my ScriptEngine code:
ScriptEngine engine = Ruby.CreateEngine();
engine.Runtime.Globals.SetVariable("MainPage", this);
string code = "MainPage.txtTitle.Text = \"Hello from IronRuby!\"";
engine.Execute(code);
And, here's my using statements that it requires:
using IronRuby;
using Microsoft.Scripting.Hosting;
When I try to Add Reference to the following Assemblies/DLLs from the IronRuby 1.0 release, Visual Studio 2010 doesn't let me add them and provides no exception message as to why. As a result I am unable to compile the solution.
IronRuby.dll
IronRuby.Libraries.dll
IronRuby.Libraries.YAML.dll
Microsoft.Dynamic.dll
Microsoft.Scripting.Debugging.dll
Microsoft.Scripting.dll
I assume that the reason Visual Studio 2010 isn't letting me add the Assemblies/DLLs is because they are compiled for .NET and not Silverlight.
Does anyone know where I can get Silverlight 4 versions of those assemblies or exactly what I'm doing incorrectly?
Any help would be appreciated. Thanks!
The Silverlight versions for both IronRuby 1.0 and IronPython 1.0 are hidden in the IronRuby 1.0 for .NET 2.0 SP1 (Zip archive) downloadable from http://ironruby.codeplex.com/releases. In the zip look for silverlight\bin.
The IronRuby 1.1 Silverlight release is also available. IronPython 1.1 for Silverlight however is nowhere to be found. The DLR isn't getting the love from Microsoft it deserves, little documentation, binaries are very hard to find, the future for IronRuby and IronPython doesn't look bright...
Just a note to Koen's answer:
The IronPython\Silverlight\bin .dlls from IronPython 2.6.x are .NET 3.5 binaries (work fine in Silverlight 4). The .NET 4 binaries for Silverlight 4 will be available with IronPython 2.7 (currently in alpha).
I was looking for some kind of scripting engine compatible with Silverlight, and after hours of research, I've found one. I had not tested yet but I just discovered a project called PaxScript.net that has support for Silverlight 3/4/5. According to the author, you can script using VB.NET, C# and Delphi.NET. It does generate byte-code. I don't know why this project is not known, maybe lack of "disclosure".

how to setup VS 2010 to allow debugging of Silverlight 3 and Silverlight 4

I have some code which is in Silverlight 3. I am unable to move to SL4 at this time.
I would however like to use VS 2010 to do my SL 3 development... and SL4 development.
The idea of both runtimes coexisting on 1 machine i thought I heard Microsoft got
right this time in VS 2010.
is this correct?
if yes, then Where can I find the instructions how to set this up?
thanks for any help you can provide,
Sincerely,
J
Silverlight is not side-by-side. VS 2010 provides multi-targeting support for the full .NET framework, which is side-by-side, but NOT Silverlight.
There can only be one version of the Silverlight plugin and runtime on the machine.
That said, if you want to build code targeting one or the other, that is possible by checking in the Silverlight versions to your source enlistment. This post is a little outdated but provides an example for doing this for SL2 and SL3.

Silverlight IDE for latest version (May 2010)

In 2008 Artur Carvalho asked for an Alternative IDE for Silverlight and was told to look at Visual Studio Express.
Is that still the valid answer in 2010 or are there other IDEs one should consider (cost/ OS it runs on / stability)?
I'm trying to get a feel for silverlight development before commiting cash. So I don't need enterprize level tools or a license to distribute ..
Would MonoDevelop and Moonlight be an option?
On Windows I haven't heard about anything besides Visual Studio Express 2010. On Mac you can use Eclipse for Silverlight.
As for me, I don't develop SL daily rather occasionally and starting with Blend 3 I can actually use Blend for most of my smaller personal projects and don't bother to install VS although I have a licence for it. Blend now has a decent support for Intellisense and most UI stuff is easier in Blend. Yes, Blend is not free.

Silverlight 3.0: Can't add references beyond v2

I wanted to add System.Data.Linq to my Silverlight 3.0 app, but the only references that are available to me are listed as version 2.0.50727 or lower. Shouldn't I have access to more than that?
In my project's properties, my Target Silverlight Version is set to "Silverlight 3.0" (the only option), and I'm using Visual Studio 2010 Beta 2.
Is this expected behavior, or should I be able to add that reference, and more?
You can't access System.Data.Linq in Siverlight, this dll would make no sense in the sandboxed client-side silverlight runtime. Hence no such silverlight dll exists. What you probably need to be looking into is Entity Framework on the server plus WCF to access the data from Silverlight.
For reasons best known by Microsoft all the standard Silverlight dlls have the 2.0.5.0 version numbers even the new ones added to the Silverlight 3 SDK.
This is the version number of the controls in Silverlight 3. It confused me at first. Also it's System.Linq in Silverlight and should be included by default when you create a new project.
Silverlight 4 is a separate download to VS2010.

Resources