Archive for the ‘.NET 4.5’ Category
Posted by jpluimers on 2015/05/12
Boy, Microsoft made it hard to find the location of xsd.exe !
It is actually located like here:
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\xsd.exe
But that is nowhere on the default path, nor in the registry.
What happens during installation of Visual Studio and/or the Microsoft SDK, is that the vsvars32.bat file of Visual Studio is updated so it can add the location of many tools (including xsd.exe) to the PATH.
So the trick is to find the youngest Visual Studio first, then run the according vsvars32.bat, and then xsd.exe is on the path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Dynamically finds the installed xsd.exe, then calls it with the passed parameters
:: test these environment variables that have 110 or 120 in them (future enhancements: support more Visual Studio versions):
:: Visual Studio .NET 2002: VS70COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio .NET\Common7\Tools\
:: Visual Studio .NET 2003: VS71COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\Tools\
:: Visual Studio 2005: VS80COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\
:: Visual Studio 2008: VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
:: Visual Studio 2010: VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
:: Visual Studio 2012: VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
:: Visual Studio 2013: VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
:: They contain `vsvars32.bat` which will update the `PATH` so it includes where `xsd.exe` resides
setlocal enabledelayedexpansion
:: delayed expansion allows for the exclamation marks
:: see http://ss64.com/nt/delayedexpansion.html
:: see http://stackoverflow.com/questions/22857407/windows-batch-how-to-assign-variable-with-dynamic-name
for %%v in (70 71 80 90 100 110 120 130) do if not [!VS%%vCOMNTOOLS!]==[] set VSCOMNTOOLS=!VS%%vCOMNTOOLS!
call :do call "!VSCOMNTOOLS!vsvars32.bat"
call :do where xsd.exe
xsd.exe %*
endlocal
goto :eof
:do
echo %*
%*
goto :eof
–jeroen
via:
Read the rest of this entry »
Posted in .NET , .NET 2.0 , .NET 3.0 , .NET 3.5 , .NET 4.0 , .NET 4.5 , C# , C# 2.0 , C# 3.0 , C# 4.0 , C# 5.0 , C# 6 (Roslyn) , Development , Software Development , Visual Studio 11 , Visual Studio 2010 , Visual Studio 2013 , Visual Studio 2014 , Visual Studio and tools , XML/XSD , XSD | 1 Comment »
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.
Read the rest of this entry »
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 »
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.
Visual Studio – Google+ .
–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 »
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:
–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 »
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:
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 »
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 »
Posted by jpluimers on 2015/02/10
Posted in .NET , .NET 2.0 , .NET 3.0 , .NET 3.5 , .NET 4.0 , .NET 4.5 , C# , C# 2.0 , C# 3.0 , C# 4.0 , C# 5.0 , Delphi , Delphi 5 , Delphi 6 , Delphi 7 , Delphi XE , Delphi XE2 , Delphi XE3 , Delphi XE4 , Delphi XE5 , Development , Software Development | Leave a Comment »
Posted by jpluimers on 2015/02/04
Thanks Stefan Glienke for pointing me to NCrunch for Visual Studio :
It intelligently runs automated tests so that you don’t have to, and gives you a huge amount of useful information about your tested code, such as code coverage and performance metrics, inline in your IDE while you type.
–jeroen
Posted in .NET , .NET 2.0 , .NET 3.0 , .NET 3.5 , .NET 4.0 , .NET 4.5 , C# , C# 2.0 , C# 3.0 , C# 4.0 , C# 5.0 , C# 6 (Roslyn) , Development , Software Development | Leave a Comment »
Posted by jpluimers on 2015/01/27
A few libraries for writing and/or reading CSV files in .NET:
Most of the above links come from these SO questions:
Together with the links from my previous CSV post If you think CSV is easy; think again that should get everyone going.
–jeroen
Posted in .NET , .NET 2.0 , .NET 3.0 , .NET 3.5 , .NET 4.0 , .NET 4.5 , C# , C# 2.0 , C# 3.0 , C# 4.0 , C# 5.0 , CSV , Development , Software Development | Leave a Comment »
Posted by jpluimers on 2014/12/24
Once every while you still do WinForms work, and bump into something you hadn’t bumped into before.
This time it was trying to set ForeColor = Color.Red on a ReadOnly TextBox for displaying error messages:
Using a TextBox means the user can still copy the text to the clipboard.
Using a Red foreground draws enough attention (it’s was an app with a really busy user interface).
When setting a TextBox from ReadOnly = false to true sets the BackColor from SystemColors.Window (usually white) to SystemColors.Control (usually light grey), and leaves the ForeColor to SystemColors.WindowText (usually black).
Setting ForeColor = Color.Red (funny there is a plural in SystemColors but not in Color ) it doesn’t display it as such:
To my surprise, the TextBox had ReadOnly text (you could copy, but not modify it), which showed with a a grey (SystemColors.Control) BackColor and a black (SystemColors.WindowText) ForeColor: the defaults for a ReadOnly TextBox, not using my ForeColor = Color.Red;
I vaguely remembered there was some odd way of solving this, but since I hadn’t written a blog article about it back then (somewhere around .NET 1.x or 2.0 I didn’t have a blog yet), I was glad that Cheetah posted this answer on StackOverflow : Read the rest of this entry »
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 , Color (software development) , Development , Software Development , VB.NET , VB.NET 10.0 , VB.NET 11.0 , VB.NET 7.0 , VB.NET 7.1 , VB.NET 8.0 , VB.NET 9.0 , Visual Studio 11 , Visual Studio 2002 , Visual Studio 2003 , Visual Studio 2005 , Visual Studio 2008 , Visual Studio 2010 , Visual Studio and tools , WinForms | Leave a Comment »