Can't build SilverlightV3 configuration

I can’t build IronRuby configured for silverlight. Here’s the command I
tried:

C:\source\RMXPx\src\Languages\Ruby>msbuild %DLR_ROOT%\Solutions\Ruby.sln
/p:Configuration=“Silverlight3Debug” /p:SilverlightPath=“C:\Program
Files
(x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0” >
c:\source\msbuild.txt

Here’s the error output:

error CS1685 : Warning as error : The predefined type
‘System.Runtime.InteropServices.DefaultParameterValueAttribute’ is
defined
in multiple assemblies in the global alias; using definition from
‘c:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Stubs.cs’
[C:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj]
Actions\DynamicObject.cs(36,6): error CS0436: Warning as Error: The type
‘System.SerializableAttribute’ in
‘c:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Stubs.cs’
conflicts
with the imported type ‘System.SerializableAttribute’ in
‘c:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll’. Using the
type
defined in
‘c:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Stubs.cs’.
[C:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj]
Actions\DynamicObject.cs(36,6): error CS0436: Warning as Error: The type
‘System.SerializableAttribute’ in
‘c:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Stubs.cs’
conflicts
with the imported type ‘System.SerializableAttribute’ in
‘c:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll’. Using the
type
defined in
‘c:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Stubs.cs’.
[C:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj]
Done Building Project
“C:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj”
(default targets) – FAILED.
Done Building Project
“C:\source\RMXPx\src\Languages\Ruby\Ruby\Ruby.csproj”
(default targets) – FAILED.

I tried using the SilverlightPath above becuase I do not have a
directory
like “C:\Program Files (x86)\Microsoft Silverlight\3.0…”

This is what Alias.txt looks like, for reference:

bsrbd =msbuild %DLR_ROOT%\Solutions\Ruby.sln
/p:Configuration=“Silverlight3Debug” /p:SilverlightPath=“C:\Program
Files\Microsoft Silverlight\3.0.50106.0”
bsrbr =msbuild %DLR_ROOT%\Solutions\Ruby.sln
/p:Configuration=“Silverlight3Release” /p:SilverlightPath=“C:\Program
Files\Microsoft Silverlight\3.0.50106.0”
bsd =msbuild %DLR_ROOT%\Hosts\Silverlight\Silverlight.sln
/p:Configuration=“Silverlight3Debug” /p:SilverlightPath=“C:\Program
Files\Microsoft Silverlight\3.0.50106.0”
bsr =msbuild %DLR_ROOT%\Hosts\Silverlight\Silverlight.sln
/p:Configuration=“Silverlight3Release” /p:SilverlightPath=“C:\Program
Files\Microsoft Silverlight\3.0.50106.0”
bsd4 =msbuild %DLR_ROOT%\Hosts\Silverlight\Silverlight4.sln
/p:Configuration=“Silverlight4Debug” /p:SilverlightPath="C:\Program
Files\Microsoft Silverlight\4.0.41108.0 "
bsr4 =msbuild %DLR_ROOT%\Hosts\Silverlight\Silverlight4.sln
/p:Configuration=“Silverlight4Release” /p:SilverlightPath="C:\Program
Files\Microsoft Silverlight\4.0.41108.0 "

And here are the directories I have on my machine:

C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\Silverlight\v3.0
C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\Silverlight\v4.0
C:\Program Files (x86)\Microsoft SDKs\Silverlight\v3.0
C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0
C:\Program Files (x86)\Microsoft Silverlight\4.0.50524.0

While I do have “C:\Program Files (x86)\Microsoft
Silverlight\4.0.50524.0”
(and using that to build IronRuby for Silverlight 4 works), I do not
have a
similarly named folder for Silverlight 3.

Any suggestions for how I might build IR for Silverlight 3? Am I
missing a
folder, or does the latest Silverlight installer use a directory
structure
that’s incompatible with the IronRuby projects’ assembly reference
hints?

Thanks,

-Charles

I just noticed another problem. When I build IronRuby for Silverlight
4,
the Microsoft.Dynamic assembly references the full .NET CLR’s
System.Numeric, as well as both Silverlights and the CLR’s version of
mscorlib. Here’s the list of references, taken from Reflector:

=====================
// Assembly Reference Microsoft.Scripting
Version: 2.0.5.0
Name: Microsoft.Scripting, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=null

// Assembly Reference mscorlib
Version: 2.0.5.0
Name: mscorlib, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e

// Assembly Reference mscorlib
Version: 4.0.0.0
Name: mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089

// Assembly Reference System
Version: 2.0.5.0
Name: System, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e

// Assembly Reference System.Core
Version: 2.0.5.0
Name: System.Core, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e

// Assembly Reference System.Numerics
Version: 4.0.0.0
Name: System.Numerics, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089

I think this might be related to this ticket on CodePlex:
http://dlr.codeplex.com/Thread/View.aspx?ThreadId=210773

I’m not sure if this part from Microsoft.Dynamic.csproj is responsible
for
the aforementioned problem or not, but this doesn’t look right:
<Reference Include=“System.Numerics, Version=2.0.5.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35” Condition="’$(TargetFrameworkVersion)’

‘v4.0’ ">
False
$(SilverlightPath)\System.Numerics.dll

System.Numerics.dll does not exist in “C:\Program Files (x86)\Microsoft
Silverlight\4.0.50524.0” (SilverlightPath), so I’m pretty positive that
needs to be changed to “C:\Program Files (x86)\Microsoft
SDKs\Silverlight\v4.0\Libraries\Client” (or some macro that expands to
that
path). Am I mistaken here? That’s the only folder on my disk that
contains
a copy of System.Numerics targeting Silverlight,

I’m curious, how was the v1.1 release built (was it against SL
4.0.41108.0,
or perhaps 4.0.50524.0)? Is Silverlight horribly misconfigured on my
machine… or are these actual problems?

-Charles

On Sun, Jul 25, 2010 at 7:08 AM, Charles S. <

One other little detail while it’s on my mind. It turns out that you
need
to have Ruby 1.8 on your path in order to build successfully - otherwise
generate_dlrjs.rb will fail:

C:/source/ironruby/Hosts/Silverlight/Scripts/generate_dlrjs.rb:18:
invalid
multibyte char (US-ASCII)
C:/source/ironruby/Hosts/Silverlight/Scripts/generate_dlrjs.rb:18:
invalid
multibyte char (US-ASCII)
C:/source/ironruby/Hosts/Silverlight/Scripts/generate_dlrjs.rb:18:
syntax
error, unexpected $end, expecting ‘)’
dlrjs.gsub!(//, ‘’)
^

We can either put this at the top:

coding: utf-8

or replace the goofy UTF characters (I’d go with the latter).

I’ll write up a patch and submit it, assuming none of the dev beat me to
it
:).

-Charles

On Sun, Jul 25, 2010 at 9:19 AM, Charles S. <

Our build shouldn’t depend on Ruby 1.8. We should run IronRuby 1.0 binaries
that are checked into the repository. I’ll take a look.

That’s what I figured - but it looks like it’s running my installation
of
Matz’s Ruby on my path instead.

Obviously there shouldn’t be any goofy UTF8 characters either J

That’s right - only the serious ones :slight_smile:

As for the Silverlight refrences… we have System.Numerics checked into
the
same directory as SL binaries. We should add a different msbuild
variable
for them. For now you can do the same – copy all Silverlight 3 dlls that
we
reference into some directory and build against that.

I got the SL4 config to build by copying over System.Numerics - I’ll see
if
I can get the SL3 config to build using your advice.

-Charles

On Sun, Jul 25, 2010 at 2:01 PM, Tomas M. <

Our build shouldn’t depend on Ruby 1.8. We should run IronRuby 1.0
binaries that are checked into the repository. I’ll take a look.
Obviously there shouldn’t be any goofy UTF8 characters either ☺

As for the Silverlight refrences… we have System.Numerics checked into
the same directory as SL binaries. We should add a different msbuild
variable for them. For now you can do the same – copy all Silverlight 3
dlls that we reference into some directory and build against that.

Tomas

From: [email protected]
[mailto:[email protected]] On Behalf Of Charles
Strahan
Sent: Sunday, July 25, 2010 7:52 AM
To: [email protected]
Subject: Re: [Ironruby-core] Can’t build SilverlightV3 configuration

One other little detail while it’s on my mind. It turns out that you
need to have Ruby 1.8 on your path in order to build successfully -
otherwise generate_dlrjs.rb will fail:

C:/source/ironruby/Hosts/Silverlight/Scripts/generate_dlrjs.rb:18:
invalid multibyte char (US-ASCII)
C:/source/ironruby/Hosts/Silverlight/Scripts/generate_dlrjs.rb:18:
invalid multibyte char (US-ASCII)
C:/source/ironruby/Hosts/Silverlight/Scripts/generate_dlrjs.rb:18:
syntax error, unexpected $end, expecting ‘)’
dlrjs.gsub!(//, ‘’)
^

We can either put this at the top:

coding: utf-8

or replace the goofy UTF characters (I’d go with the latter).

I’ll write up a patch and submit it, assuming none of the dev beat me to
it :).

-Charles

On Sun, Jul 25, 2010 at 9:19 AM, Charles S.
<[email protected]mailto:[email protected]> wrote:
I just noticed another problem. When I build IronRuby for Silverlight
4, the Microsoft.Dynamic assembly references the full .NET CLR’s
System.Numeric, as well as both Silverlights and the CLR’s version of
mscorlib. Here’s the list of references, taken from Reflector:

=====================
// Assembly Reference Microsoft.Scripting
Version: 2.0.5.0
Name: Microsoft.Scripting, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=null

// Assembly Reference mscorlib
Version: 2.0.5.0
Name: mscorlib, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e

// Assembly Reference mscorlib
Version: 4.0.0.0
Name: mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089

// Assembly Reference System
Version: 2.0.5.0
Name: System, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e

// Assembly Reference System.Core
Version: 2.0.5.0
Name: System.Core, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e

// Assembly Reference System.Numerics
Version: 4.0.0.0
Name: System.Numerics, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089

I think this might be related to this ticket on CodePlex:
http://dlr.codeplex.com/Thread/View.aspx?ThreadId=210773

I’m not sure if this part from Microsoft.Dynamic.csproj is responsible
for the aforementioned problem or not, but this doesn’t look right:

False
$(SilverlightPath)\System.Numerics.dll

System.Numerics.dll does not exist in “C:\Program Files (x86)\Microsoft
Silverlight\4.0.50524.0” (SilverlightPath), so I’m pretty positive that
needs to be changed to “C:\Program Files (x86)\Microsoft
SDKs\Silverlight\v4.0\Libraries\Client” (or some macro that expands to
that path). Am I mistaken here? That’s the only folder on my disk that
contains a copy of System.Numerics targeting Silverlight,

I’m curious, how was the v1.1 release built (was it against SL
4.0.41108.0, or perhaps 4.0.50524.0)? Is Silverlight horribly
misconfigured on my machine… or are these actual problems?

-Charles

On Sun, Jul 25, 2010 at 7:08 AM, Charles S.
<[email protected]mailto:[email protected]ain.invalid> wrote:
I can’t build IronRuby configured for silverlight. Here’s the command I
tried:

C:\source\RMXPx\src\Languages\Ruby>msbuild %DLR_ROOT%\Solutions\Ruby.sln
/p:Configuration=“Silverlight3Debug” /p:SilverlightPath=“C:\Program
Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0”

c:\source\msbuild.txt

Here’s the error output:

error CS1685 : Warning as error : The predefined type
‘System.Runtime.InteropServices.DefaultParameterValueAttribute’ is
defined in multiple assemblies in the global alias; using definition
from ‘c:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Stubs.cs’
[C:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj]
Actions\DynamicObject.cs(36,6): error CS0436: Warning as Error: The type
‘System.SerializableAttribute’ in
‘c:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Stubs.cs’
conflicts with the imported type ‘System.SerializableAttribute’ in
‘c:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll’. Using the
type defined in
‘c:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Stubs.cs’.
[C:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj]
Actions\DynamicObject.cs(36,6): error CS0436: Warning as Error: The type
‘System.SerializableAttribute’ in
‘c:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Stubs.cs’
conflicts with the imported type ‘System.SerializableAttribute’ in
‘c:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll’. Using the
type defined in
‘c:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Stubs.cs’.
[C:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj]
Done Building Project
“C:\source\RMXPx\src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj”
(default targets) – FAILED.
Done Building Project
“C:\source\RMXPx\src\Languages\Ruby\Ruby\Ruby.csproj” (default targets)
– FAILED.

I tried using the SilverlightPath above becuase I do not have a
directory like “C:\Program Files (x86)\Microsoft Silverlight\3.0…”

This is what Alias.txt looks like, for reference:

bsrbd =msbuild %DLR_ROOT%\Solutions\Ruby.sln
/p:Configuration=“Silverlight3Debug” /p:SilverlightPath=“C:\Program
Files\Microsoft Silverlight\3.0.50106.0”
bsrbr =msbuild %DLR_ROOT%\Solutions\Ruby.sln
/p:Configuration=“Silverlight3Release” /p:SilverlightPath=“C:\Program
Files\Microsoft Silverlight\3.0.50106.0”
bsd =msbuild %DLR_ROOT%\Hosts\Silverlight\Silverlight.sln
/p:Configuration=“Silverlight3Debug” /p:SilverlightPath=“C:\Program
Files\Microsoft Silverlight\3.0.50106.0”
bsr =msbuild %DLR_ROOT%\Hosts\Silverlight\Silverlight.sln
/p:Configuration=“Silverlight3Release” /p:SilverlightPath=“C:\Program
Files\Microsoft Silverlight\3.0.50106.0”
bsd4 =msbuild %DLR_ROOT%\Hosts\Silverlight\Silverlight4.sln
/p:Configuration=“Silverlight4Debug” /p:SilverlightPath="C:\Program
Files\Microsoft Silverlight\4.0.41108.0 "
bsr4 =msbuild %DLR_ROOT%\Hosts\Silverlight\Silverlight4.sln
/p:Configuration=“Silverlight4Release” /p:SilverlightPath="C:\Program
Files\Microsoft Silverlight\4.0.41108.0 "

And here are the directories I have on my machine:

C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\Silverlight\v3.0
C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\Silverlight\v4.0
C:\Program Files (x86)\Microsoft SDKs\Silverlight\v3.0
C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0
C:\Program Files (x86)\Microsoft Silverlight\4.0.50524.0

While I do have “C:\Program Files (x86)\Microsoft
Silverlight\4.0.50524.0” (and using that to build IronRuby for
Silverlight 4 works), I do not have a similarly named folder for
Silverlight 3.

Any suggestions for how I might build IR for Silverlight 3? Am I
missing a folder, or does the latest Silverlight installer use a
directory structure that’s incompatible with the IronRuby projects’
assembly reference hints?

Thanks,

-Charles

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs