Welcome to WindowsClient.net | Sign in | Join
Saturday, November 07, 2009 9:09 PM odewit

Silverlight 3.0 from scratch

For pedagogical reasons, or to build a code generator (like Perspective Fx does), it may be useful to compile Silverlight code on the command-line. Last year, I wrote an article for Silverlight 2.0 about this subject. I have adapted it today to Silverlight 3.0.

The main differences are at the paths :

  • libraries path (/lib compiler option, .rsp file),
  • MsBuild Microsoft.Silverlight.CSharp.targets task path (.proj file).
Filed under:

Comments

# re: Silverlight 3.0 from scratch

Saturday, November 07, 2009 7:33 PM by OldManChild

Maybe I am doing something wrong but I still get a CS0116 Error.

Followed the instructions to the letter.

Looking through the updated article and code,I didnt come across any references to MsBuild Microsoft.Silverlight.CSharp.targets.

Have a feeling that it's something I am not doing right. I have the .Net Framework 4 Beta and even though I set the path to version 3.5, it could be tripping me up.

Will keep trying though.

# re: Silverlight 3.0 from scratch

Sunday, November 08, 2009 3:19 AM by odewit

The references to Microsoft.Silverlight.CSharp.targets are used only by the MsBuild versions of the demo (see 1.0\MsBuild\SlApp.proj file).

I have tested my code on a new Windows Seven install with the Silverlight runtime and the beta 2 version of Visual Studio 2010.

Did you install the beta 2 ? You could install the Silverlight 3 SDK.

Do these directories exist on your computer ?

- C:\Windows\Microsoft.NET\Framework\v3.5

- C:\Program Files\Microsoft Silverlight\3.0.40818.0

- C:\Program Files\MSBuild\Microsoft\Silverlight\v3.0

# re: Silverlight 3.0 from scratch

Saturday, November 14, 2009 8:37 PM by OldManChild

Glad to report that it is working perfectly now. Didn't have to reinstall anything and all the above mentioned directories exist.

Great thing about your post is that it taught me how to create everything in code without resorting to a XAML file.

Call me crazy or a deviant but that's my preferred route. Hate messing about with XAML.

Will keep you updated.

Regards

Leave a Comment

(required) 
(required) 
(optional)
(required) 
 
Page view counter