Silverlight sample

40 views
Skip to first unread message

its Win32nipuh

unread,
Mar 12, 2012, 8:39:18 AM3/12/12
to CS-Script
Hi,
when I run ViewXP.cmd I see the form with whte background but no any
images.
The same when I run converted exe.
What may be wrong?

It is W7, all files unlocked, cscs works without any errors.

Thanks.
Regards,
Oleg.
Message has been deleted

Oleg Shilo

unread,
Mar 12, 2012, 8:55:49 AM3/12/12
to CS-Script
I have just tested the ViewXAP.cmd (I guessed that it is the batch
file you are trying to run) and it seems that the app indeed does not
show the images.
Mind you that the xap file was compiled long time ago and may or may
not be compatible with the latest Silverlight runtime.

I will have a look at it.

Oleg

its Win32nipuh

unread,
Mar 12, 2012, 9:30:30 AM3/12/12
to CS-Script
Hi Oleg,

I have downloaded binaries from your site, then unblock zip, then
copied files to W7, WS 2008 and to XP SP3 computers.
On each computer I did the same actions: install.cmd, then run cmd to
Preview Silverlight sample and generate exe and run it.

It works fine on XP (preview and generated exe).

But on W7 and WS2008 I do nto see the images in sample BookPages.
Thean I converted my more complex Silverlight app, it works on XP
only.

Thank you.
WBR,
Oleg.

its Win32nipuh

unread,
Mar 13, 2012, 12:50:15 PM3/13/12
to CS-Script
Hi,
I have found teh reason why the sample does not work.
I build x86 application on W7 x64 - now it works.
It seems cscs comverts xap->exe as AnyCPU, then exe does not work.

Regards,
Oleg.

Oleg Shilo

unread,
Mar 13, 2012, 7:39:45 PM3/13/12
to CS-Script
You are faster then me :)

Yes indeed for some wired reason x64 breaks the app.

This problem should not exist at the first place. The XAP viewer is
nothing else but a very primitive Web server and after checking it
under x64 I can confirm that the only resource it is returning (XAP
hosting Web page) is returned back to the Web browser the same way in
both x86 and x64 scenarios.

Thus the only difference and the potential offender I can see is the
hosting IE as an ActiveX control. Well with this guy anything can
happen...

I have slightly adjusted the Silverlight sample and the engine itself
to allow forced x86 runtime. Please find the patch here
http://csscript.net/LatestBuild.html

Cheers,
Oleg

P.S. It is funny to see the conversation between Oleg and Oleg. One
can easily confuse who sent which message.

its Win32nipuh

unread,
Mar 14, 2012, 4:25:29 AM3/14/12
to CS-Script
Hi Oleg,
yes, now XP viewer and converted exe works fine on x64 W7, thanks.

I converted my xap which works with WCF service and read config from
file. It works too. For this I corrected little bit
private void BeginGetReponse(IAsyncResult result)
But it is another story ;-)

PS. yes, Oleg's discussion :-)).
А ще більш цікаво те, що ми майже земляки ;-)

On 14 Mrz., 00:39, Oleg Shilo <oleg.sh...@gmail.com> wrote:
> You are faster then me :)
>
> Yes indeed for some wired reason x64 breaks the app.
>
> This problem should not exist at the first place. The XAP viewer is
> nothing else but a very primitive Web server and after checking it
> under x64 I can confirm that the only resource it is returning (XAP
> hosting Web page) is returned back to the Web browser the same way in
> both x86 and x64 scenarios.
>
> Thus the only difference and the potential offender I can see is the
> hosting IE as an ActiveX control. Well with this guy anything can
> happen...
>
> I have slightly adjusted the Silverlight sample and the engine itself
> to allow forced x86 runtime. Please find the patch herehttp://csscript.net/LatestBuild.html

its Win32nipuh

unread,
Mar 14, 2012, 5:30:11 AM3/14/12
to CS-Script
Yet one note:

I unzipped files which you provided, then copied samples from the
previous installation.

xap preview works fine, but conversion to exe does not work because
of an error:

System.Exception: In order to generate executable you must run
'silverlight.cs' as a script
at Utils.GenerateExecutable(string xapFile)
at Script.Main (String[] args)

This last zip does not contain many files which are in full
installation.

Regards,
Oleg.

On 14 Mrz., 09:25, its Win32nipuh <win32ni...@googlemail.com> wrote:
> Hi Oleg,
> yes, now XP viewer and converted exe works fine on x64 W7, thanks.
>
> I converted my xap which works with WCF service and read config from
> file. It works too. For this I corrected little bit
> private void BeginGetReponse(IAsyncResult result)
> But it is another story ;-)
>
> PS. yes, Oleg's discussion :-)).

>
> On 14 Mrz., 00:39, Oleg Shilo <oleg.sh...@gmail.com> wrote:
>
>
>
>
>
>
>
> > You are faster then me :)
>
> > Yes indeed for some wired reason x64 breaks the app.
>
> > This problem should not exist at the first place. The XAP viewer is
> > nothing else but a very primitive Web server and after checking it
> > under x64 I can confirm that the only resource it is returning (XAP
> > hosting Web page) is returned back to the Web browser the same way in
> > both x86 and x64 scenarios.
>
> > Thus the only difference and the potential offender I can see is the
> > hosting IE as an ActiveX control. Well with this guy anything can
> > happen...
>
> > I have slightly adjusted the Silverlight sample and the engine itself
> > to allow forced x86 runtime. Please find the patch herehttp://csscript.net/LatestBuild.html
>
> > Cheers,
> > Oleg
>
> > P.S. It is funny to see the conversation between Oleg and Oleg. One
> > can easily confuse who sent which message.
>
> > On Mar 14, 3:50šam, its Win32nipuh <win32ni...@googlemail.com> wrote:
>
> > > Hi,
> > > I have found teh reason why the sample does not work.
> > > I build x86 application on W7 x64 - now it works.
> > > It seems cscs comverts xap->exe as AnyCPU, then exe does not work.
>
> > > Regards,
> > > Oleg.
>
> > > On 12 Mrz., 14:30, its Win32nipuh <win32ni...@googlemail.com> wrote:
>
> > > > Hi Oleg,
>
> > > > I have downloaded binaries from your site, then unblock zip, then
> > > > copied files to W7, WS 2008 šand to XP SP3 computers.
> > > > On each computer I did the same actions: install.cmd, then run cmd to
> > > > Preview Silverlight sample and generate exe and run it.
>
> > > > It works fine on XP (preview and generated exe).
>
> > > > But on W7 and WS2008 I do nto see the images in sample BookPages.
> > > > Thean I converted my more complex Silverlight app, it works on XP
> > > > only.
>
> > > > Thank you.
> > > > WBR,
> > > > Oleg.
>
> > > > On 12 Mrz., 13:55, Oleg Shilo <oleg.sh...@gmail.com> wrote:
>
> > > > > I have just tested the ViewXAP.cmd (I guessed that it is the batch
> > > > > file you are trying to run) and it seems that the app indeed does not
> > > > > show the images.
> > > > > Mind you that the xap file was compiled long time ago and may or may
> > > > > not be compatible with the latest Silverlight runtime.
>
> > > > > I will have a look at it.
>
> > > > > Oleg
>
> > > > > On Mar 12, 11:39špm, its Win32nipuh <win32ni...@googlemail.com> wrote:
>
> > > > > > Hi,
> > > > > > when I run šViewXP.cmd I see the form with whte background but no any

its Win32nipuh

unread,
Mar 14, 2012, 5:52:52 AM3/14/12
to CS-Script
I think it is debug version

public static void GenerateExecutable(string xapFile)
{
string resource = "";
string xapSource = "";

try
{
var scriptFile = CSSEnvironment.PrimaryScriptFile;
scriptFile = @"E:\cs-script\Lib\silverlight.cs"; //zos
<------------------------!!!!!

if (scriptFile == null || !File.Exists(scriptFile))
throw new Exception("In order to generate executable
you must run 'silverlight.cs' as a script");

string csscriptEngine =
Assembly.GetEntryAssembly().Location;
csscriptEngine = @"E:\cs-script\cscs.exe"; //zos
<------------------------!!!!!



On 14 Mrz., 09:25, its Win32nipuh <win32ni...@googlemail.com> wrote:
> Hi Oleg,
> yes, now XP viewer and converted exe works fine on x64 W7, thanks.
>
> I converted my xap which works with WCF service and read config from
> file. It works too. For this I corrected little bit
> private void BeginGetReponse(IAsyncResult result)
> But it is another story ;-)
>
> PS. yes, Oleg's discussion :-)).
> á ÝÅ Â¦ÌØÛ Ã¦ËÁ×Ï ÔÅ, ÝÏ ÍÉ ÍÁÊÖÅ ÚÅÍÌÑËÉ ;-)
>
> On 14 Mrz., 00:39, Oleg Shilo <oleg.sh...@gmail.com> wrote:
>
>
>
>
>
>
>
> > You are faster then me :)
>
> > Yes indeed for some wired reason x64 breaks the app.
>
> > This problem should not exist at the first place. The XAP viewer is
> > nothing else but a very primitive Web server and after checking it
> > under x64 I can confirm that the only resource it is returning (XAP
> > hosting Web page) is returned back to the Web browser the same way in
> > both x86 and x64 scenarios.
>
> > Thus the only difference and the potential offender I can see is the
> > hosting IE as an ActiveX control. Well with this guy anything can
> > happen...
>
> > I have slightly adjusted the Silverlight sample and the engine itself
> > to allow forced x86 runtime. Please find the patch herehttp://csscript.net/LatestBuild.html
>
> > Cheers,
> > Oleg
>
> > P.S. It is funny to see the conversation between Oleg and Oleg. One
> > can easily confuse who sent which message.
>
> > On Mar 14, 3:50šam, its Win32nipuh <win32ni...@googlemail.com> wrote:
>
> > > Hi,
> > > I have found teh reason why the sample does not work.
> > > I build x86 application on W7 x64 - now it works.
> > > It seems cscs comverts xap->exe as AnyCPU, then exe does not work.
>
> > > Regards,
> > > Oleg.
>
> > > On 12 Mrz., 14:30, its Win32nipuh <win32ni...@googlemail.com> wrote:
>
> > > > Hi Oleg,
>
> > > > I have downloaded binaries from your site, then unblock zip, then
> > > > copied files to W7, WS 2008 šand to XP SP3 computers.
> > > > On each computer I did the same actions: install.cmd, then run cmd to
> > > > Preview Silverlight sample and generate exe and run it.
>
> > > > It works fine on XP (preview and generated exe).
>
> > > > But on W7 and WS2008 I do nto see the images in sample BookPages.
> > > > Thean I converted my more complex Silverlight app, it works on XP
> > > > only.
>
> > > > Thank you.
> > > > WBR,
> > > > Oleg.
>
> > > > On 12 Mrz., 13:55, Oleg Shilo <oleg.sh...@gmail.com> wrote:
>
> > > > > I have just tested the ViewXAP.cmd (I guessed that it is the batch
> > > > > file you are trying to run) and it seems that the app indeed does not
> > > > > show the images.
> > > > > Mind you that the xap file was compiled long time ago and may or may
> > > > > not be compatible with the latest Silverlight runtime.
>
> > > > > I will have a look at it.
>
> > > > > Oleg
>
> > > > > On Mar 12, 11:39špm, its Win32nipuh <win32ni...@googlemail.com> wrote:
>
> > > > > > Hi,
> > > > > > when I run šViewXP.cmd I see the form with whte background but no any

Oleg Shilo

unread,
Mar 14, 2012, 6:18:07 AM3/14/12
to cs-s...@googlegroups.com
Yep, already noticed too.

The zip file you have downloaded contains silverlight.cs with some testing leftovers. My mistake. It is corrected now so please download it again.

As for the "missing" files in the zip, it is intended. The archive contains only the files changed since the last full version release. That is why it is a patch but not a full release. Saying that, the critical mass for the full release has been reached and I will be making accumulative full release soon. 

Cheers,
Oleg 

P.S. 
>А ще більш цікаво те, що ми майже земляки ;-) 
А ти хiба також з Австралii?

its Win32nipuh

unread,
Mar 14, 2012, 7:23:01 AM3/14/12
to CS-Script
ok, thnx, will try this version.

ps.
Ні, з України. ;-)

On 14 Mrz., 11:18, Oleg Shilo <oleg.sh...@gmail.com> wrote:
> Yep, already noticed too.
>
> The zip file you have downloaded contains silverlight.cs with some testing
> leftovers. My mistake. It is corrected now so please download it again.
>
> As for the "missing" files in the zip, it is intended. The archive contains
> only the files changed since the last full version release. That is why it
> is a patch but not a full release. Saying that, the critical mass for the
> full release has been reached and I will be making accumulative full
> release soon.
>
> Cheers,
> Oleg
>
> P.S.>А ще більш цікаво те, що ми майже земляки ;-)
>
> А ти хiба також з Австралii?
>
> On Wed, Mar 14, 2012 at 8:30 PM, its Win32nipuh
> <win32ni...@googlemail.com>wrote:

Oleg Shilo

unread,
Mar 14, 2012, 7:24:49 AM3/14/12
to cs-s...@googlegroups.com
Гаразд, все одно земляки :о)
Reply all
Reply to author
Forward
0 new messages