Category: Development

  • How to debug msbuild issues

    To debug msbuild build failures, you can run following from VS command prompt to get more build log output msbuild /v:diag <solutionname> If you want to log messages for debug during build, you can use Message tasks. For example, use Message task inside a target <Target Name="DisplayMessages">   <Message Text="Project File Name = $(MSBuildProjectFile)" />…

  • SQL Server Version History

    By default you can’t restore a sql backup that was taken from a higher version sql server. Otherwise you might get following error when doing restore. System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.1600. That version is incompatible with this server, which is running version 10.00.2714. Either restore the database on…

  • Configure PowerShell to use DotNet 4.0

    You might get following error when you load a snap-in that is written by DotNet 4.0. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. This is because by default, PowerShell uses DotNet version 2.0 CLR. To use powershell load DotNet 4.0 assemblies, the following settings need…

  • How to run ps1 scripts

    PowerShell scripts are text files with ".ps1" extensions that contain PowerShell commands. Starting with Windows Server 2008, PowerShell is built into the OS. For earlier OS versions, you will need to download PowerShell at Microsoft PowerShell Site and install it. To run ps1 scripts, you first need to enable scripts by running: Set-ExecutionPolicy RemoteSigned Otherwise,…

  • Free ebook: Programming Windows Phone 7

    Microsoft are now giving away the eBook Programming Windows Phone 7 by Charles Petzold.  For detail information of this ebook, view http://blogs.msdn.com/b/microsoft_press/archive/2010/10/28/free-ebook-programming-windows-phone-7-by-charles-petzold.aspx You can download a PDF here (38.6 MB). And you can download the ebook’s sample code here (5.03 MB).

  • [ODBC Driver Manager] Data source name not found and no default driver specified

    If you run osql.exe utility on server that does not have SQL server installed, you might get following error: [ODBC Driver Manager] Data source name not found and no default driver specified. This is because osql utility uses ODBC API to communicate to SQL server and SQL ODBC driver is not installed. To fix this,…

  • Grant Permission to DefaultAppPool Identity

    After upgrading web applications to IIS 7.5 on Windows Server 2008 R2, you might get following error. Access to the path ‘d:sitecache.txt’ is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.…

  • Make IIS 7.5 application pools run as NETWORK SERVICE

    There is a break change in IIS 7.5 on Windows 7 and Windows Server 2008 R2. The default identity for running an application pool is "ApplicationPoolIdentity".  If you have a web application developed against application pools running with NETWORK SERVICE on IIS6/7, it might break after migrated to IIS 7.5 due to default application pool…

  • Mixed mode assembly Error After Upgrading to DotNet 4.0

    After upgrading existing DotNet 2.0 or 3.5 application to DotNet 4.0, you might see following error message Mixed mode assembly is built against version ‘v2.0.50727’ of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. To fix this issue, put a config file next to your exe called <exename>.exe.config with…

  • Windows Phone 7 Application Development Get Start

    Getting Start with Windows Phone 7 Application Development Download the tools and emulator from http://developer.windowsphone.com Using the tutorial from the Microsoft Channel9 Learning Center, build your first application.