Pretend like a file in git has not been changed

In order to pretend like a file has not been changed since it was checked out from git (for instance to check in changes to a web.config file)

git update-index --assume-unchanged Web.config

And to undo this:

git update-index --assume-unchanged Web.config

CrystalReports supress if field is empty

In order to supress (for instance a section) when a field is empty, mark the section as suppress, open the “Section expert” and click the pen next to “Supress” and then enter when to supress like:

{MyTable.MyField} = '' OR IsNull({MyTable.MyField})

This example will supress the field wither if it is an empty string or DBNull

MSTest on build-server

Keept getting errormessages like the following

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): 
warning MSB3245: 
Could not resolve this reference. 
Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". 
Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

Turns out there is a simpler solution than installing Visual Studio on the build-server.
there is a nuget package that resolves this error

PM> Install-Package Microsoft.VisualStudio.QualityTools.UnitTestFramework.Updated

AnkhSVN “No uncommitted changes” but nothing is shown in the log and update does not solve the warning

When doing a merge using AnkhSVN and doing “pre-merge best practices check” the error message “No uncommitted changes” is shown this means that the working copy is not updated or has changes that are not commited.

However sometimes this error can be shown even when the pending changes window in Visual Studio is empty and you have done update to Latest version. (Most likely there are files that Subversion see as missing or Deleted but that are not shown in the pending changes window)

The solution I use when this happens is to open the working copy folder and use TortoiseSVN to see what is going on and then solve things so that TortoiseSVN shows nothing in the pending changes.

Also from the console “svn status -q” can be used to see what files have changes. (-q means that we only would like status on files that are under version control.

Internet Explorer 10 Turning Compatibility mode on (From server)

In order to turn Compatibility mode on for Internet Explorer the server should send “X-UA-Compatible” as a header with the value IE=EmulateIE9. This will force Internet explorer to use compatibility mode if it is a version higher than 9

If we using ISS (making for instance a asp.net project) the following web.config can be used to do this.

<configuration>
  <!-- Other settings -->
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=EmulateIE9" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

Mode details on the possible values for the header tag

Sometimes sending this as a header tag works, then this should be sent first in the header tag

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />

Internet Explorer 10 Turning Compatibility mode off (From server)

In order to turn Compatibility mode off for Internet Explorer the server should send “X-UA-Compatible” as a header with the value IE=Edge. This will force Internet explorer to use the latest mode the version has (this works from IE 6 to 11 and up)

If we using ISS (making for instance a asp.net project) the following web.config can be used to do this.

<configuration>
  <!-- Other settings -->
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=Edge" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

Mode details on the possible values for the header tag