Archive

Archive for June, 2013

PowerShell Dev Tip: Counting the number of lines in a VS project

Yesterday, I was confronted with the issue that I had to know the number of lines in a C# project to estimate the complexity of a rewrite. In order to get the job done, I wrote a little PowerShell script that counts all the source lines in a given project folder. Writing this in the PowerShell is remarkable easy thanks to the Measure-Object command.

Get-ChildItem -recurse -filter "*.cs" . | Foreach-Object {
	$lines = Get-Content $_.FullName | Measure-Object -line
	$fileAnalysis = New-Object -TypeName PSObject
	$fileAnalysis | Add-Member -MemberType NoteProperty -Name "Name" -Value $_.FullName
	$fileAnalysis | Add-Member -MemberType NoteProperty -Name "Lines" -Value $lines.Lines
	Write-Output $fileAnalysis
} | Export-Csv -NoTypeInformation -Delimiter ";" result.csv
Categories: PowerShell

Jace.NET 0.8.1 released

I am happy to anounce that Jace.NET 0.8.1 has been released with support for the unary minus operation. No breaking changes were done to the API.

The new version is uploaded to the official NuGet repository: https://www.nuget.org/packages/Jace. The source can be found on GitHub: https://github.com/pieterderycke/Jace.

Jace.NET runs on .NET 4.0 and higher, WinRT, Windows Phone 7 and Windows Phone 8.

Categories: Jace.NET