The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for May, 2015

Batch file: Finds the location of xsd.exe by running the vsvars32.bat of the youngest installed Visual Studio

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.


:: 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

view raw

Run-Xsd.exe.bat

hosted with ❤ by GitHub

–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 »

Classic that are now available freely for reading/listing (via: About Us | Open Culture)

Posted by jpluimers on 2015/05/11

A while ago, my good friend Arjen Lentz pointed me to the free e-books section on OpenCulture.

I didn’t have time back then, and now I finally do and am truly impressed. So here is a plug:

What is Open Culture’s Mission?

Open Culture brings together high-quality cultural & educational media for the worldwide lifelong learning community. Web 2.0 has given us great amounts of intelligent audio and video. It’s all free. It’s all enriching. But it’s also scattered across the web, and not easy to find. Our whole mission is to centralize this content, curate it, and give you access to this high quality content whenever and wherever you want it. Some of our major resource collections include:

–jeroen

via About Us | Open Culture.

Posted in About, LifeHacker, Opinions, Personal, Power User | Leave a Comment »

Nieuwe term voor WLZ zorg thuis: “Zorg met verblijf”

Posted by jpluimers on 2015/05/10

Om het met de AWBZ, WLZ, WMO en trekkingsrecht (zo ingewikkeld dat het nog niet op Wikipedia staat) allemaal makkelijker te maken heet WLZ zorg thuis nu soms “Zorg met verblijf”.

Het CAK (voorheen Centraal administratiekantoor, maar is die term niet waard: ze “vergeten” zaken uit hun administratie op het moment dat hen dat uit komt) noemt het “Zorg met verblijf” in hun correspondentie, maar het zorgkantoor rept hier met geen woord over in hun correspondentie.

Als je dan de folder die het CAK bijsluit goed leest is er een speciaal onderdeel van “Zorg met verblijf” dat “Volledig pakket thuis” heet. Die vindt je dan wel weer terug op de site van het zorgkantoor, maar niet in de correspondentie. Als je onder “ik wil zorg” kijkt, dan begrijp ik dat veel zorgbehoevenden door de bomen het bos niet meer zien.

De overheid: makkelijker kunnen we het niet maken.

–jeroen

Posted in About, Curatele, Opinions, Personal | Leave a Comment »

Debugging problems with the network proxy (via: The Chromium Projects)

Posted by jpluimers on 2015/05/08

In this case, another tool didn’t obtain the right Proxy settings.

Chrome to the rescue as chrome://net-internals/#proxy shows you the system proxy settings:

When browsers are experiencing network problems, generally the first thing to test is your network proxy settings. Misconfigured settings, or misbehaving settings, can have a profound impact on your network traffic possibly resulting in pages not loading at all.

Main take aways: chrome://net-internals/#proxy

Since then, I created this small batch file:

reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | findstr proxy

And this one to edit the settings:

"C:\Windows\system32\rundll32.exe" shell32.dll,Control_RunDLL inetcpl.cpl,,4

It will open the same Window that your Control Panel or Internet Explorer uses to manage connection and proxy settings.
From there click the “LAN Settings” button to edit the proxy configuration.

–jeroen

via: Debugging problems with the network proxy – The Chromium Projects.

Posted in Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP, Windows-Http-Proxy | Leave a Comment »

Allow tests to be grouped by class, category, and namespace in Test Explorer – Customer Feedback for Microsoft

Posted by jpluimers on 2015/05/07

Usually I setup the grouping and filtering of the Test Explorer like this:

I really wish there was a multi-level grouping possibility here (:

–jeroen

via: Allow tests to be grouped by class, category, and namespace in Test Explorer – Customer Feedback for Microsoft.

Posted in .NET, Development, Software Development, Visual Studio 11, Visual Studio 2013, Visual Studio and tools | Leave a Comment »

Delphi Component vendors: when you ship source code, make it IDE-browsable as well by compiling with $YD or $Y+

Posted by jpluimers on 2015/05/06

It took me a while to figure this one out:

When you have a registered Delphi, you can Ctrl-Click browse both the units and symbols of RTL, VCL, etc. But Delphi will not recompile these units.

Some third party components you cannot Ctrl-Click browse the units or symbols, unless you put the source directory in the Delphi Library Path (which causes them to be compiled each and every time).

This is because:

  • the precompiled DCUs are in the Delphi Library Path.
  • the source code is added to the Delphi Browsing Path (and sometimes not even that).
  • the DCUs don’t contain information that the source code is Browsable or Referencable as it was compiled with {$Y-}.

These are the possible values for that directive:

  1. {$Y-} or {$DEFINITIONINFO OFF} or {$REFERENCEINFO OFF},
  2. {$Y+} or{$REFERENCEINFO ON},
  3. {$YD} or {DEFINITIONINFO ON}

So please component vendors: when you ship source code, make it IDE-browsable as well by compiling with $YD or $Y+.

–jeroen

via:

Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | 2 Comments »

Finding the path of xsd.exe from your Visual Studio Build Events

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 »

2.5 inch, 3 TB, 15 mm – Toshiba MQ03ABB*** Series – hopefully it can be ordered soon

Posted by jpluimers on 2015/05/04

I wonder if Toshiba’s MQ03ABB300 really can be ordered in May:

  • 3 TB
  • 2.5 inch
  • 15 mm Height
  • 5,400 rpm

–jeroen

via:

Posted in Hardware, Power User | 1 Comment »

Lars Fosdal: VS/C#6 is out-delphi-ing Delphi. I hope EMBT is paying attention. Currently…

Posted by jpluimers on 2015/05/01

Interesting, Lars Fosdal writes:

VS/C#6 is out-delphi-ing Delphi.

I hope EMBT is paying attention.

Currently live at http://channel9.msdn.com/

I already liked the 7 minute C#6 video from last year. This is even better.

–jeroen

via: VS/C#6 is out-delphi-ing Delphi. I hope EMBT is paying attention. Currently….

Posted in .NET, C#, C# 6 (Roslyn), Delphi, Development, Software Development, VB.NET, VB.NET 14.0 | 10 Comments »

Macbook Pro Retina QHD+ 2015 Expected Specs. Skylake.

Posted by jpluimers on 2015/05/01

A few places, including the comment thread at MacWorld UK – New 2015 MacBook Pro with Retina display release date, specs and UK pricing – News – Page 2 – Macworld UK have a some rumours on the Macbook Pro Retina QHD+ 2015 Expected Specs: Skylake and more.

This would be having the Skylake Tock of the Intel Tick-Tock.

If Apple pulls that of this year, I’m sure lots of high end developers and graphics people are going to get it:

Macbook Pro Retina QHD+ 2015 Expected Specs.

  • Processor : Intel Skylake i7-6770HQ (40% Faster & 50% Power Efficient Over Haswell)
  • RAM: 32 GB DDR4 @ 2400 Mhz.
  • Display : Retina QHD+ (iPS/OLED 30% Power Saving!)
  • Hard Disk : 3rd-gen PCIe SSD 2.1Gbps Read Speed 1.6Gbps Write Speed.
  • Graphics Card : Intel & GTX 970 M 4GB DDR5 256Bit. (300x Faster & 50% Less pwr vs 750m)
  • Body/Looks : New Thinner Design & 3 Color Options.(Radical New Look)
  • Security : Touch ID integration.
  • Webcam : Improved Face time HD Camera 1080p @ 60fps
  • Keyboard : New Multi Color LED Backlight Keyboard.

–jeroen

Posted in Apple, Mac, MacBook, MacBook Retina, Power User | Leave a Comment »