September 2007 - Posts

My friends and colleagues keep on asking me about the blue screen of death that i keep on gettin on my laptop. So, to feed their (and perhaps your) curiosity, here's how I get it. From sysinternals website:

 http://www.microsoft.com/technet/sysinternals/Utilities/BlueScreen.mspx

Enjoy!

Cool, finally I have some hard disk space for Visual Studio 2008 Beta 2. So, the first project that I want to try is, of course, Silverlight 1.1. And so I downloaded the VS 2008 B2 image file, installed it, then Silverlight 1.1 Alpha refresh, and finally the VS Silverlight Tools Alpha for VS 2008 B2. Get all the downloads at silverlight.net.

Okay, now is the time i've been waiting on. I launched VS 2008 B2, create new project of type Silverlight Project, and then "Boom!". I was shown an error message that VS 2008 B2 is not allowed access to "Testpage.html.js". And then my AVG anti virus (free edition) gives a pop-up of "suspected" virus with hidden extension ".js". Uh-oh! A quick check with Silverlight.net forum, it seems like the error happens only when we have AVG antivirus installed. Can't find a quick solution, I decided to get my hands dirty. I decided to change the Testpage.html.js to Testpage.js, so that the AVG "thinks" that it is legitimate .js file. After all, this is just a testpage. Here's what i did:

1. Open up the VS 2008 B2 program files folder:
 C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\
(path may vary with your machine if you customized it)

 

2. Launch windows command prompt, A quick "findstr /S /L /I /M Testpage.html.js *.*" (the arguments were just easy to remember :D) shows that basically there are 4 CSharp files having testpage.html.js content, with the last file "testpage.html.js" were denied access as well. The 4 files are found in 2 different locations (I'm using C#. there could be more locations if you have installed more languages, such as VB.net, C++.net, i guess).

A. C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\Silverlight\1033\SilverlightProject.zip (It's a zip file)

B. C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\CSharp\Silverlight\1033\SilverlightProject.zip

 

3. Then I did the following changes (remember to back up first):

A. SilverlightProject.csproj
     <None Include="TestPage.html.js">
-->     
 <None Include="TestPage.js">

B. SilverlightProject.vstemplate
      <ProjectItem OpenInEditor="false" ReplaceParameters="false">TestPage.html.js</ProjectItem>
-->
      <ProjectItem OpenInEditor="false" ReplaceParameters="false">TestPage.js</ProjectItem>

C. Testpage.html
    <script ... src="TestPage.html.js"></script>
-->
    <script ... src="TestPage.js"></script>

D. Rename Testpage.html.js --> Testpage.js


4. Re-create a new Silverlight project from VS 2008 B2, and voila! It works!


Hope this tips helps, and enjoy Silverlight! It's really a cool application.