Sunday, August 21, 2011

Editing a Silverlight Template in Expression Blend 4

So, I have been working on a particular website for a few years now - updating it here and there whenever the main owner wants it done. Recently, we migrated from a Silverlight 2 player to a Silverlight 4 player. Now, it had been a while since I updated the video player technology on their site, so I couldn't completely remember what I did to make everything possible. Also, since the last time I updated their player, I had purchased a new laptop for the purposes of development. On the new laptop, I had fresh copies of all of my development tools:

  • Visual Web Developer Express 2010

  • Microsoft SQL Server Express 2008

  • Notepad++

  • Expression Encoder 4 Express

So, after a few months of using this configuration setup on my new laptop, the owner of the website asked me to update the player technology from Silverlight 2 to Silverlight 4. So, I thought for a second, then I remembered what I needed to do...

So, I launched Microsoft Expression Encoder Express and dragged a video file on the surface. I chose a new template that I wanted from the templates panel on the right and encoded the video. After the video was done being encoded, a new browser window popped up and was showing me the new player that I just created. Everything looked good except for the logo that I had previously on the old version of the player on the bottom right hand side, was not there. This was obviously because I had not yet added the logo to the new player.

So, I thought for a little while on how I managed to get the logo on the old player. It may have been simply because it had been a while since I had created a player that I couldn't remember how exactly everything was supposed to work in Encoder. may have been that I had purchased Encoder Pro and was using that instead of Encoder Express, which is what I previously was working on. No matter what the reason, all I could remember is that in order for me to get the logo on the player, I needed to somehow open up the player via Expression Blend.

So, after turning to Google, I discovered that all I had to do was select the template in Expression Encoder and click the "gears" button on that panel, then select "Edit a copy in Expression Blend." So, I did that.

On one tutorial that I read, it said that all you have to do is open the Silverlight media template in Expression Blend and then build the project, then add your "stuff" to it, then build again and return to Expression Encoder and it will have picked up your changes.

The problem was that when I opened the copy of the template I wanted to edit in Expression Blend, I couldn't get it to build! It kept giving me errors about not being able to find al.exe or something like that. Well, I googled that too and it said that where you get this error message is when you're trying to compile a project using a different .NET framework version than you have installed on your machine. I couldn't understand. I had Visual Web Developer 2010 (.NET Framework 4) and Expression Studio Ultimate 4 (.NET Framework 4). So, at this point, I could not understand why it wasn't working.

Here is the result:

What I found is that you cannot simply download Expression Ultimate or any of the expression programs and expect to be able to build projects if you don't have the WINDOWS version of the Microsoft development program installed on the same machine. What does THAT mean?

Recall the list of programs that I mentioned that I had installed since I was working on my new laptop:

  • Visual Web Developer 2010 Express

  • Microsoft SQL Server 2008 Express

  • Notepad++

  • Microsoft Expression Studio 4 (replaced Microsoft Expression Encoder 4 Express)

The applications that I have installed on my machine do not include a "full install" of Visual Studio. Instead, the only visual studio program that I have installed is the Visual Web Developer app, which is only for development of web applications. In order for me to be able to compile the Silverlight template that I was trying to compile, I need to have AT LEAST Visual Basic Express installed on my machine. Without this, the full development tools are not installed and I am unable to compile windows based applications.

So, to make a long story short:

If you're having trouble compiling a default edited Silverlight 4 media template in Expression Blend, check to make sure that you have Visual Basic Express or Visual C# Express installed on your machine. That should solve the issue.

1 comment:

Debra said...

Leairnng a ton from these neat articles.