Ironpython 2.6.1 on Silverlight 4 - silverlight

I am trying to integrate IronPython in my Silverlight application but am unable to do so. After downloading the binaries, every time I try to add the dlls as references in my VS2010 solution all I get is an error about them not being compiled for Silverlight. I have even tried downloading the source distribution, but cannot set the various projects making up the solution to build against Silverlight (the only choices I have are different versions of the .net framework).
As the IronPython website explicitly states Silverlight compatibility, why is it not working? Is there any easier way of getting scripting capabilities in my Silverlight app?

You have to use binaries from IronPython-2.6.1\Silverlight\bin folder in Silverlight.

Related

How to create MSI for WPF .Net Core 3 Application?

When working with .Net Framework 4.7 & WPF, we use fody weaver to package up all the project dlls etc... into one dll, so we could then use Wix installer.
This is extremely convenient, and fody worked a treat.
With a .Net Core 3.1 Wpf app I cant get fody to work and they have put it in maintenance mode because of .net core 3's new single- file exe's.
I can create a single file exe but still need to install my app as its code signed and I want the user experience to be familiar with the standard ms installer ui.
At the moment im sure I can create a Wix project and include all the dll's, but there are hundreds of them with .net core & this is an immense amount of work.
Can anyone shed any light on how to install a .net core 3 WPF app using Wix?

Coded UI Testing of Silverlight in Sharepoint 2010

I am creating a Coded UI test for our system which runs on Sharepoint 2010. Part of the test sequence is creating a site; Sharepoint's UI for creating sites runs on Silverlight. Therefore, I need to create a Coded UI test for a Silverlight component which is part of out-of-the-box Sharepoint rather then part of our application. When I try to record a test, I get the following message:
No Silverlight controls where detected. Verify that the application under test is built using Silverlight assemblies with a version of 4.0 or greater and that a reference to the Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll assembly has been added to the project. For more information, see http://go.microsoft.com/fwlink/?LinkId=204562
I have two questions:
1) How can I find out the Silverlight version which Sharepoint components are built against? If they are built against Silverlight version 3.5 or earlier - I suppose the problem is unresolvable?
2) Assuming the previous question is answered - how can I make Sharepoint's Silverlight components reference the SilverlightUIAutomationHelper.dll library? That seems problematic at best to me...
Silverlight version installed on the test machine is 4; Visual Studio Feature Pack 2 is installed.
Thanks.
You can't make SharePoint's Silverlight components reference the automation helper library unless you have the source code and can recompile them. So the answer to your first question doesn't really matter.
You could modify Sharepoint XAPs to simply add Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll in there. You don't really need the code itself to reference it, it just has to part of the package. The XAP file is just a zip file so you should be able to modify this.
You will have to find where Sharepoint is getting the XAPs from and change the source (obviously you don't want to do this in prod boxes and there's even a license restriction for the Automation dll that prevents you from do it). You could also write a Fiddler AutoResponder to modify the XAP file and add the dll before it gets to the browser. For an example of this have a look at this AutoResponder:
https://bitbucket.org/mamadero/hackingsilverlightdemo/src/2fecb7b59dec/FiddlerAutoResponder

A good Silverlight 3.0 reference application, with source?

Having never written a production quality Silverlight app, I am looking to find a quality open source reference application for Silverlight 3.0 (Silverlight 4.0 is no good as I have VS2008) to help learn Silverlight.
Ideally I'd like to see:
a line of business application, in the client-server tradition.
SQL Server back end
no use of 3rd party libraries like PRISM or CSLA as I would like to see how the core Silverlight technologies work.
I realise there are plenty of open source projects on Codeplex, but struggled to find any classic line of business apps there.
This is a really good one:
http://timecard.codeplex.com/
The following does use Prism, but you can learn a lot from it. It even shows localization:
http://happynet.codeplex.com/
In all honesty, get yourself upgraded to VS 2010. If you are serious about becoming a professional in Silverlight development, version 4 has the most bang-for-your-buck.
Not all the newer technologies are supported for Silverlight 3 and all the latest cool tutorials and project examples tend to be in VS2010/SL4.
You also should not ignore patterns like MVVM and libraries like Prism & MEF as they are rapidly becoming commonplace for Silverlight projects. There is more danger of you getting into Win-forms-style bad habits if you use a Win-forms style approach to Silverlight at first.
Here is a simple explanation of MVVM for Silverlight:
http://openlightgroup.net/Blog/tabid/58/EntryId/89/Silverlight-View-Model-Style-An-Overly-Simplified-Explanation.aspx
These videos are a good introduction to creating/understanding Prism-based projects, specifically for Silverlight:
http://channel9.msdn.com/posts/mtaulty/Prism--Silverlight-Part-1-Taking-Sketched-Code-Towards-Unity/
It includes him building an Outlook-style application using prism (with full source provided).
The codeplex project, full source and documents etc, for Prism and soon MEF is here:
http://compositewpf.codeplex.com/wikipage?title=Getting%20Started&referringTitle=Home
Prism was created by Microsoft and will soon have a final release of version 4 (including MEF).

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.

WPF application is crashing after publish

I've upgraded WPF application to Visual Studio 2k8. App is .NET 3.0 which is set as a platform in the project.
If I build project & release confiuguration, app is running well.
If I try to publish it using ClickOnce, it is crashing because xaml resources couldn't be find.
Any idea?
Thank you very much.
P.S. It seem that XAML resources aren't really included in Resources in the assembly. If assemble is just rebuilded (without Publish) everything is ok and XAML are included in resources.
Have a look at the One Click Deployment options on your project.
On the Publish tab, have a look at the Application Files section.
Some files might not have been included.
It seems I solved this problem.
My application has been upgraded from V2k5 to V2k8.
If .NET 3.0 is target platform, the problem exists.
If .NET 3.5 is target platform, problem solved.
Thank you for your collaboration.

Resources