Wednesday, November 19, 2008

Using Source Control with Silverlight 2 and non-standard fonts

I just ran into this and tought I'd post a heads-up. When you build a Silverlight Class Library and use some fonts in it, that are not standard to Silverlight 2, the fonts you use are delivered to the browser plugin. To make it all work, it uses SubsetFontTask.dll. To make the fonts available it uses a .targets file which is imported into your project trough an tag.

This is all very nice and works as one might expect. Also its nice and transparent. If you don't look for it you probably don't even notice...

...until, that is, you add your project to source control. It appears that everything is just fine, until a collegue tries to get the same project working on his or her own computer. Then Visual Studio throws a nasty error about not being able to import the .targets file.

Fortunatly it's easy to fix. Just add the .targets file to source control. And then you simply do get latest version and...

...it breaks again, because it can't find the SubsetFontTask.dll in the root of the project where it expects it. So we add this file to source control as well. And then finally it works.

This doesn't seem right. I would expect that whenever I add a project to source control trough Visual Studio, it checks in all the files that are needed to build a project on any machine, that is properly installed.

Please let me know what you think about this, trough the comments below.

No comments:

Post a Comment