Fixing Conflicts between different versions of the same assembly MSB3247

http://mikehadlow.blogspot.co.uk/2011/02/asmspy-little-tool-to-help-fix-assembly.html

http://stackoverflow.com/questions/1871073/resolving-msb3247-found-conflicts-between-different-versions-of-the-same-depen

In a sufficiently big codebase it is hard to avoid the assembly version conflict problem.

This tool is a great means of tracking down the problem.

Run it in the directory that the assembly is in and it will list the versions of the dependencies oif everything used.

Query A Database From Powershell

function Execute-Query

{

param

(

[string]$server = “.”,

[Parameter(Mandatory=$true)]

[string]$database,

[Parameter(Mandatory=$true)]

[string]$query

)

$SqlConnection = New-Object System.Data.SqlClient.SqlConnection

$SqlConnection.ConnectionString = “Server=$server;Database=$database;Integrated Security=True”

$SqlCmd = New-Object System.Data.SqlClient.SqlCommand

$SqlCmd.CommandText = $query

$SqlCmd.Connection = $SqlConnection

$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter

$SqlAdapter.SelectCommand = $SqlCmd

$DataSet = New-Object System.Data.DataSet

[void]$SqlAdapter.Fill($DataSet)

$SqlConnection.Close()

$DataSet.Tables[0]

}