Windows and .Net framework default versions
Aaron Stebner has compiled a list of which version of the .Net Framework is included in which version of Windows by default:
Operating System | Framework Version | Included As |
---|---|---|
Windows XP Home/Professional SP1 | .NET Framework 1.0 + SP2 | MSI Based Installer |
Windows XP Home/Professional SP2 | .NET Framework 1.1 + SP1 | MSI Based Installer |
Windows XP Media Center Edition | .NET Framework 1.0 + SP2 | OS Component |
Windows XP Tablet PC Edition | .NET Framework 1.0 + SP2 | OS Component |
Windows Server 2003 (all editions) | .NET Framework 1.1 | OS Component |
Windows Server 2003 R2 | .NET Framework 2.0 | MSI Based Installer* |
Windows Vista (all editions) | .NET Framework 2.0 & 3.0 | OS Component |
* although it appears as an OS component, it is actually just an MSI based installer.
The MSI based installers can be used to install or uninstall the .Net Framework from the OS, enabling it to be removed completely if needed.
Very useful if you are targeting specific platforms with your .Net applications.
AssemblyFileVersion compiler warning
If you are using the AssemblyFileVersion
attribute to mark your compiled assemblies with specific Win32 file version numbers, you may get a compiler warning with certain revision numbers. The compiler warning looks like this:
warning CS1607: Assembly generation -- The version '2.0.0.070105' specified for the 'file version' is not in the normal 'major.minor.build.revision' format.
This warning is documented as occurring when the version string is not in the major.minor.build.revision
format, but does not explain why it happens for the example above.
Frans Bouma updated his existing post with the reason why. The revision part of the version number must not exceed 65535 (ie. a 16-bit number). If it does, the compiler generates the warning. The MSBuild Team posted about the same thing, but also provided the fact that it is the underlying operating system that imposes this limit.
The difference between format and quick format
Having done several installations of Windows over the years and always chosen the “quick format” option over the normal format option (mainly due to the time it takes to do a full format compared to a quick format), I finally looked into what the differences between the two are. Microsoft’s site has a knowledge base article about this very thing.
A full format will wipe the disk, format it and run a check disk to find any bad sectors. A quick format will wipe the disk and format it, but will skip the check disk stage. As it turns out, the check disk stage is the thing that causes a full format to take a lot longer than a quick format.
If formatting a new hard disk, it is probably wise therefore to do a full format to find any sectors that may have been damaged whilst the disk was in transit. If formatting an old disk, it is already in a known state and so a quick format should suffice.
C# data types and other language features
There’s a nice little section on Microsoft’s MSDN site entitled The C# Programming Language for Java Developers that explains the basics of the C# language features.
Although not incredibly detailed, it’s quite a useful reference for simple language information, especially about the system types (such as the range of a double
or what types can be implicitly cast to a short
).
Accessing network file shares from a command prompt
If you’ve ever tried to access a network file share in a command prompt by simply using the cd command, you’ll know that it just complains that “CMD does not support UNC paths as current directories”. Well, there is a way to do it (two in fact):
net use z: \\machine\share
pushd \\machine\share
Both of these approaches map the network share to a local drive letter that you can change to using the cd command.
The first one can be combined with the /user switch to provide additional user details:
net use z: \\machine\share /user:domain\username
The bonus of using the pushd command over the net use command is that it will automatically change the current directory to the mapped drive (which will be the first unused drive letter available in reverse alphabetical order). Also, when finished with the network share, you can use the popd command to remove the mapped drive.