Often I want to execute a TF.exe from the console, but don’t have the Visual Studio environment variables setup. Most of the times I want to run TF.exe from the most current Visual Studio installation, hence this TF.bat file figures out the location of it, then runs with the parameters passed to TF.bat: Read the rest of this entry »
Archive for the ‘.NET’ Category
Find an installed tf.exe, then run it with the command-line parameters specified.
Posted by jpluimers on 2015/04/30
Posted in .NET, Software Development, Development, Visual Studio and tools, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio 11, Visual Studio 2013, Visual Studio 2014 | 1 Comment »
Coding Kata videos: Bowling game
Posted by jpluimers on 2015/04/22
A long and shorter while ago, I wrote about practicing your coding and test driven development skills:
- Cyber-Dojo: practice unit-tested programming in pairs/groups using Katas.
- RosettaCode: cool way to improve your coding skills.
Here are some Coding Kata videos of the Bowling Game Kata in various languages and environments. Some of them are dumb (no audio) just like good practice usually is. Note: it helps to know a bit about 10 Pin Bowling Scoring rules.
- Bowling Game – Ruby – YouTube.
- Bowling Game – Python – YouTube.
- Bowling Game – Java – YouTube.
- [TDD] Bowling Game Kata – YouTube (also Java).
- Bowling Game – C# – YouTube.
- Bowling game kata in Delphi and DUnit TDD – YouTube.
And since I want to learn Haskell and have done a lot of Tic-Tac-Toe demos inthe past:
For more background information:
–jeroen
Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Java, Python, RemObjects C#, Ruby, Software Development | Leave a Comment »
Marking code as obsolete/deprecated in C# and Delphi
Posted by jpluimers on 2015/04/07
During any software life cycle, you will want to phase out some code, and most likely want to mark code to be phased out in the future.
So here are two examples on how to do that in C# and in Delphi that just shows the effects of obsoleting/deprecating code.
Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | 6 Comments »
Developer Assistant for Visual Studio with access to millions of code samples- via: Google+
Posted by jpluimers on 2015/04/02
I’m going to experiment with this. Most likely the quality of the code samples will be the biggest factor in like/dislike result.
–jeroen
Posted in .NET, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development, Visual Studio 2010, Visual Studio 2013, Visual Studio 2014, Visual Studio and tools | 1 Comment »
.NET threading: native and managed thread IDs do not per se correlate
Posted by jpluimers on 2015/03/26
Next time I run into .NET and native threading issues:
Main UI threads often have a correlation between managed and native thread IDs.
But for other threads, you cannot be really sure.
Some background articles on this:
- Threading deep dive – Day 9 – My Adventures with Microsoft Technologies – Site Home – MSDN Blogs: what happens when you have short-lived managed threads.
- Threads, fibers, stacks and address space – cbrumme’s WebLog – Site Home – MSDN Blogs: multiple managed threads might map to the same native thread.
- Win32 native threads and .Net AppDomains – Ars Technica OpenForum.
- c# – How do I get the _real_ thread id in a CLR “friendly” way? – Stack Overflow: It’s perfectly legal from a CLR perspective for a single managed thread to be backed by several different native threads during it’s lifetime.
- Native vs Managed Threads.
- c# – Getting the thread ID from a thread – Stack Overflow: You don’t synchronize on ID’s though, you use synchronization primitives like mutexes. This is only for debugging purposes.
- c# – Relationship between ManagedThreadID and Operating System ThreadID – Stack Overflow.
- .net – AppDomain.GetCurrentThreadID vs Thread.ManagedThreadID for Windows API calls? – Stack Overflow: There are also System.Threading.Thread.BeginThreadAffinity() / EndThreadAffinity() functions that purportedly stop the VM from switching between different physical threads.
–jeroen
Posted in .NET, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development | Leave a Comment »
IlMerge is on NuGet.
Posted by jpluimers on 2015/03/19
IlMerge is a great way to merge multiple .NET assemblies into one, and I use it most often to combine assemblies with console applications so I end up with one executable..
However getting the latest version always was a hassle as the ilmerge download link was unclear about the version number.
Until I found out that IlMerge is on NuGet.
To get started with NuGet, either download the NuGet GUI or command-line version, then use either of these entry points to work with NuGet packages:
- from the command prompt:
nuget install ilmerge - from the Package_Manager_Console_Window in Visual Studio or PowerShell:
Install-Package ilmerge
There is much more to the Package Manager Console and the Package Manager Dialog.
–jeroen
Posted in .NET, .NET 4.0, .NET 4.5, Development, Software Development, Visual Studio 11, Visual Studio 2010, Visual Studio and tools | Leave a Comment »
WPF Tutorial | Dependency Properties
Posted by jpluimers on 2015/03/17
Thanks to the answers for .net – What is a dependency property? – Stack Overflow, I came across this really nice WPF Tutorial | Dependency Properties.
It has one of the best explanations on Dependency Properties I’ve ever seen, and it is available online for free (:
And yes, this post is also tagged Delphi, as DSharp provides http://delphisorcery.googlecode.com/svn/trunk/Source/Core/DSharp.Core.DependencyProperty.pas.
So Dependency Properties are not just .NET any more (:
–jeroen
Posted in .NET, Delphi, Development, Software Development | Leave a Comment »
Interesting presentation at EKON 16: MSBuild Inside the Microsoft Build Engine from Sebastian Gingter
Posted by jpluimers on 2015/03/11
I missed EKON 16 as both they and we moved outside the regular conference season.
So I missed this session: EKON 16: MSBuild // Speaker Deck that has these GitHub source examples: gingters/EKON16_MSBuild.
Thanks Sebastian Gingter for pointing me at this!
msbuild is used by both Visual Studio and Delphi for building projects, and this session gave me some good ideas to improve the Continuous Integration projects I already had into place.
–jeroen
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Continuous Integration, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, msbuild, Software Development | Leave a Comment »
Visual Studio: Find unused code? – Stack Overflow
Posted by jpluimers on 2015/03/04
Interesting answers to Visual Studio: Find unused code? – Stack Overflow.
- Using Visual Studio 2008+ to remove unused using statements
- Using the [Obsolete] attribute of code you suspect is not used.
- Using ReSharper
- Using NDepend
- Using FxCop
–jeroen
Posted in .NET, Development, Software Development, Visual Studio 11, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »
Macros are gone since Visual Studio 2012, but an extension brings textual macro’s back (via Can I record/play Macros in Visual Studio 2012/2013? – Stack Overflow)
Posted by jpluimers on 2015/02/25
This is why I like the extensions in Visual Studio so much: even though recordable macro’s were removed in Visual Studio 11, textual macros (which I used most) are in the Text Macros for Visual Studio 2012/2013 extension by Xavier Poinas:
You can try this extension (I am the author):
http://visualstudiogallery.msdn.microsoft.com/8e2103b6-87cf-4fef-9410-a580c434b602
It basically does the same thing as the Notepad++ macros (text editing, no UI automation).
The code is open source (GitHub), so feel free to contribute improvements :-)
–jeroen
via: Can I record/play Macros in Visual Studio 2012/2013? – Stack Overflow.
Posted in .NET, Development, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | 4 Comments »





