A Class in App_Code Folder Does Not Get Compiled

Today I’ve experienced one odd thing with Visual Studio 2008.
As we know, App_Code is not needed for a Web application project under VS2008 since class files can be put anywhere.
However, to keep it clean and easy to find, I decided to created one and create class files under the folder.
It appears that those created objects do not be available.
In the other words, they do not get compiled.
After messing around, I found that the “Build Action” property of those files have been set to “Content” by default.
Well, it should be “Compile” so that the files get compiled.
I’ve also tried to create another folder with the name of “cs”.
The created class files under “cs” have the “Build Action” property of “Compile”.
Therefore, the solution is either set the “Build Action” property to “Compile” or never use a folder with the name of “App_Code”.

Now the question is… why does the “Build Action” property of the files under “App_Code” is “Content”?

Case-Insensitive XPath Searching

As far as I know, there is no such xpath function to do the case-insenstive search.
However, there is a work-around for this.
The solution is to receive a lower-case string as the input and use lower-case() xpath function to help perform the search.
Consider the following XML:

<?xml version="1.0" encoding="UTF-8"?>
  <name>ASUS Striker</name>

The following xpath do the search for “asu” which returns two string - “asus striker” and “asus”:


As we can see, using lower-caes() and contains() helps search for lower-case string even though the xml contains upper-case string.
The text() function indicates the value of the node in context.
You can also try name() which indicates the name of the node.
You can try using upper-case() with upper-case input string as well.

VMWare Workstation on Windows Server 2008

I’m currently in a progress of deciding whether to VMWare Workstation or Hyper-V on my Windows Server 2008 for a development environment.  At first, I meant to seek for the one with better performance.  However, I’ve come across one article at diTii.com about an issue on using VMWare Workstation on Windows Server 2008.  Below is what they say.  It’s good to know this stuff beforehand.  Thanks :)

Due to the fact, in the current Intel/AMD chip architecture, only one hardware-based hypervisor can run at a time, you will want to create a special boot entry for a Hyper-V-less boot time configuration of Windows 2008. Assuming you are currently booted into Windows 2008, at an administrative command prompt, type the following:

bcdedit /copy {current} /d “Windows 2008 (No Hyper-V)”

The above command should say: The entry was successfully copied to {guid}.

Copy that {guid} to the clipboard including the curly braces.

Now, type the following command:

bcdedit /set {guid} hypervisorlaunchtype off

In the above command, replace {guid} with what you into the clipboard.

Boot into the ‘Windows 2008 (No Hyper-V)’ instance and you will no longer bluescreen while running VMWare guests.