Archive for the ‘Visual Studio 2010’ Category
Posted by jpluimers on 2017/05/03
This might be obvious for CMake regulars, but given the help, I would never have guessed this.
Generate x64:
cmake .. -G"Visual Studio 14 Win64"
Generate x86 is just leaving out the platform away:
cmake .. -G"Visual Studio 14"
In this case they are for Visual Studio 2015 (internally named 14).
The help:
The following generators are available on this platform:
Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
Optional [arch] can be "Win64" or "IA64".
Visual Studio 9 2008 [arch] = Generates Visual Studio 2008 project files.
Optional [arch] can be "Win64" or "IA64".
Visual Studio 8 2005 [arch] = Generates Visual Studio 2005 project files.
Optional [arch] can be "Win64".
Visual Studio 7 .NET 2003 = Deprecated. Generates Visual Studio .NET
2003 project files.
–jeroen
Adopted from: [CMake] choose 32bit or 64bit in visual studio
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 2012, Visual Studio 2013, Visual Studio 2014, Visual Studio 2015, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2017/01/17
This is still one of my gripes from Visual Studio: when a changeset is linked to an incorrect work item, you still have to change this from the work item side:
You cannot change it from the changeset UI, but you can change it from most work item UI’s. You can just add a link to a the specific changeset and the changeset will show the link as well.
You have to be careful with the steps too:
- Link it from the correct work item as a changeset link
- Unlink it from the wrong work item
If you do it in reverse order, and get the changeset number wrong, you will have an orphan changeset.
–jeroen
Source: visual studio 2010 – In TFS how can I correct the links to work items on an existing changeset – Stack Overflow
Posted in Development, Software Development, Source Code Management, TFS (Team Foundation System), Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio 2015, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2016/06/29
Every once in a while I do Command-line Building With csc.exe.
When building libraries, it throws this error:
The reason is that by default it wants to build a program.
Change this default by adding the /target:library parameter.
–jeroen
via: c# – Program does not contain a static ‘Main’ method suitable for an entry point – Stack Overflow.
Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Development, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio 2014, Visual Studio 2015, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2016/06/28
The below batch file finds and runs the latest vsvars32.bat on a system.
vsvars32.bat initializes the path and other environment variables to run Visual Studio and command-line tools (like csc.exe, xsd.exe, editbin.exe).
The batch file employs a few tricks from:
:: Run the most recent vsvars32.bat
:: 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\
:: VS130COMNTOOLS was skipped: http://www.neowin.net/forum/topic/1215607-visual-studio-13-to-be-skipped-vnext-to-be-v14/
:: Visual Studio 2015: VS130COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
:: They contain `vsvars32.bat` which will update the `PATH` so it includes where `xsd.exe`, `csc.exe`, `editbin.exe` and others reside
:: Different examples: https://github.com/noop-dev/c-cgdk/blob/master/compile-vscpp.bat
:: and https://code.google.com/p/xvid4psp/source/browse/trunk/bin/4Gb+patcher.bat
:: or give it a go for any version: http://chess.eecs.berkeley.edu/ptexternal/src/ptII/ptolemy/actor/lib/fmi/fmus/template/sources/build_fmu.bat
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!
:: http://stackoverflow.com/questions/28682268/assign-variables-past-endlocal-in-a-loop
endlocal & call :do call "%VSCOMNTOOLS%vsvars32.bat"
goto :eof
:do
echo %*
%*
goto :eof
–jeroen
via: Finding the path of xsd.exe from your Visual Studio Build Events « The Wiert Corner – irregular stream of stuff.
Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Development, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio 2014, Visual Studio 2015, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2016/06/08
Boy I wish I had known this earlier. Like years ago…
In the Solution Explorer:
- Right Click Project
- Project Build Oder.
- Use the dialog to change the build order
It is next to the “Project Dependencies” in this image from Sara Ford:

Sara Ford: change “Project Build Order”
In the resulting dialog, you can change the build order within your solution.
This can be very useful when – for various reasons – you cannot have Project Level dependencies for an assembly, but have to have Assembly Reference dependencies for individual assemblies.
At a client I bumped into this, and this dialog was a life saver for us.
Others have used it because some Visual Studio versions miscalculate the dependencies.
–jeroen
Did you know… How to change the build order for your solution? – #333 – Sara Ford’s Weblog – Site Home – MSDN Blogs.
Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development, Visual Studio 11, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2016/04/14
It is pretty easy to switch from the XSD Designer to the Code view: c# – Viewing XSD as code – Stack Overflow.
But I got a bit fed up of doing this each and every time after opening an XSD file in Visual Studio.
It turns out there is a default for that which is a bit hidden away: in the File Open dialog. There,
right click on an XSD file, choose “Open with…” and select the appropriate option – then click on “Set as Default” before you actually open it.
via Stop Visual Studio 2010 opening XSDs in design mode – Stack Overflow.
–jeroen
Posted in Development, Software Development, Visual Studio 11, Visual Studio 2010, Visual Studio 2013, Visual Studio 2014, Visual Studio 2015, Visual Studio and tools, XML/XSD, XSD | 1 Comment »
Posted by jpluimers on 2016/01/18
Still a great book. I love the chapter Threading in C# – Free E-book which you also can get as a PDF download.
It’s a chapter from C# 56/5/… in a Nutshell by Joseph Albahari. Great book!
Don’t forget to read these as well: Jon Skeet: Multi-threading in .NET: Introduction and suggestions (printable) Multi-threading in .NET: Introduction and suggestions (browseable)
--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, Jon Skeet, Software Development, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio 2014, Visual Studio 2015, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2015/09/30
ReSharper has a whole set of nice keyboard shortcuts, which includes Ctrl + Shift + , for View Recent Edits.
This overwrites the Zoom Out half of the default Visual Studio zoom keyboard shortcuts (thanks Carlos Muñoz):
Ctrl + Shift + . to zoom in and Ctrl + Shift + , to zoom out.
They don’t keep an alternative for Zoom Out, and unlike most tools I know that allow for zooming, there is no keyboard accessible menu entry for Zoom Out in Visual Studio.
So you have to use your mouse to go in the lower left of your editor window in order to Zoom Out (thanks ashteele for putting that in an SO question):

Or you can reconfigure the old shortcut (thanks Aaron Ransley):
through Tools -> Options -> Environment -> Keyboard and map “View.ZoomIn” and “View.ZoomOut“
–jeroen
Posted in .NET, Development, Software Development, Visual Studio 11, Visual Studio 2010, Visual Studio 2013, Visual Studio 2014, Visual Studio and tools | Leave a Comment »