Silverlight Hello World in C# from VS 2005

In VS2005 you can create a class library which will build against the Silverlight runtime, but it’s a little work.

1. Create a Class Library.
2. Remove all references from it.
3. Right-click on the Project and pick Properties.
4. On the Build tab, click Advanced and check ‘Do not reference mscorlib.dll’
5. Manually add references to mscorlib, agclr, System, System.Core, System.Silverlight, and System.Xml.Core from the Silverlight install folder (\Program Files\Microsoft Silverlight\)

At this point your build outputs should be Silverlight consumable binaries. It looks like the equivalent command line call to csc.exe (the C# compiler) should include the references to the mentioned binaries and the /nostdlib option but may require others as well.