Archive for the ‘.NET’ Category
Posted by jpluimers on 2015/06/02
Interesting:
Shared Projects
Shared Projects are a new feature of Visual Studio 2013 Update 2 . It was initially created to support universal apps apps for both Windows Phone RT and Windows RT, and that’s what most people know about it.
However there is also this genius Visual Studio extension that allows Shared Projects on any .NET project. It means that you can create a project shproj that contains a list of C# files. This file can be referenced by any project and will be included at compile time.
With Shared Projects you are always able to debug through any references code . This makes it very easy to find and fix issues or test new features.
Note that in Visual Studio 2015, this is an official feature: Shared Project : An Impressive Feature of Visual Studio 2015 Preview .
Thanks Matthijs ter Woord for noticing that.
–jeroen
via: The unknown beauty of shared projects in .NETGeert van Horrik .
Posted in .NET , .NET 4.0 , .NET 4.5 , C# , C# 4.0 , C# 5.0 , Development , Software Development , Visual Studio 2013 , Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2015/05/27
From The Zen Of Programming :
The novice thought for a moment. “I will design a new editing program,” he said, “a program that will replace all these others.”
There are different forms of the above.
Think about them for a while.
Then name at least three.
Now go back to work.
–jeroen
via: The Zen Of Programming .
Posted in .NET , Delphi , Development , Software Development | 2 Comments »
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/05/05
I wrote about the xsd.exe tool before to generate XSD from XML:
But it is much more than that, as it is a great way of generating .NET (not only C# and VB.NET code) from XSD files:
Long ago, xsd.exe used to come as part of Visual Studio , but now it is installed with the various Microsoft Windows SDK versions (of which some are downloadable ) which makes it harder to locate on your system.
The really bad thing is that Visual Studio cannot find XSD.exe as part of your project Build Events , as the PATH has not been set up correctly.
Starting xsd.exe from a Visual Studio Build Events
In my hunt for the xsd.exe location, I started with a small batch file to find the xsd.exe locations from the registry:
Read the rest of this entry »
Posted in .NET , Continuous Integration , Development , msbuild , Software Development , Visual Studio 2003 , Visual Studio 2005 , Visual Studio 2008 , Visual Studio 2010 , Visual Studio 2013 , Visual Studio 2014 , Visual Studio and tools , XML/XSD , XSD | 3 Comments »
Posted by jpluimers on 2015/04/30
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 »
Posted in .NET , Development , Software Development , Visual Studio 11 , Visual Studio 2005 , Visual Studio 2008 , Visual Studio 2010 , Visual Studio 2013 , Visual Studio 2014 , Visual Studio and tools | 1 Comment »
Posted by jpluimers on 2015/04/22
A long and shorter while ago, I wrote about practicing your coding and test driven development 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 .
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 »
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 »