# Can't build SilverlightV3 configuration

**URL:** <https://www.ruby-forum.com/t/cant-build-silverlightv3-configuration/192168>\
**Category:** IronRuby\
**Created:** [July 25, 2010, 2:29pm UTC](https://www.ruby-forum.com/t/cant-build-silverlightv3-configuration/192168 "2010-07-25T14:29:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![valdar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5a626/32.png) [@valdar](https://www.ruby-forum.com/u/valdar)\
**Post date:** [July 25, 2010, 2:29pm UTC](https://www.ruby-forum.com/t/cant-build-silverlightv3-configuration/192168/1 "2010-07-25T14:29:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![valdar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5a626/32.png) [@valdar](https://www.ruby-forum.com/u/valdar)\
**Post date:** [July 25, 2010, 4:32pm UTC](https://www.ruby-forum.com/t/cant-build-silverlightv3-configuration/192168/2 "2010-07-25T16:32:16Z")

</div>

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](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. \<

---

<div class="post-metadata">

**Author:** ![valdar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5a626/32.png) [@valdar](https://www.ruby-forum.com/u/valdar)\
**Post date:** [July 25, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/cant-build-silverlightv3-configuration/192168/3 "2010-07-25T16:57:26Z")

</div>

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. \<

---

<div class="post-metadata">

**Author:** ![valdar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5a626/32.png) [@valdar](https://www.ruby-forum.com/u/valdar)\
**Post date:** [July 26, 2010, 1:47pm UTC](https://www.ruby-forum.com/t/cant-build-silverlightv3-configuration/192168/4 "2010-07-26T13:47:08Z")

</div>

> 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 🙂

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. \<

---

<div class="post-metadata">

**Author:** ![valdar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5a626/32.png) [@valdar](https://www.ruby-forum.com/u/valdar)\
**Post date:** [July 25, 2010, 9:17pm UTC](https://www.ruby-forum.com/t/cant-build-silverlightv3-configuration/192168/5 "2010-07-25T21:17:55Z")

</div>

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: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Charles  
Strahan  
Sent: Sunday, July 25, 2010 7:52 AM  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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.  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> 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](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.  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.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
