After a couple of requests, I added WiX 4.0 support to my Paraffin project, the file harvester, which makes maintaining installer projects a lot easier. As part of this update, I moved the code to Visual Studio 2017 and moved to .NET Framework 4.6.2. I nearly went down the path of making a .NET Core version of the console application, but will save that for another day.
Instead of rehashing the scope and purpose of Paraffin here, head over to your favorite search engine and search “Wintellect Paraffin” and you will find all the links that show how to use it. Also, if you don’t want to mess with compiling the application, head on over to the Releases tab page on the Git Hub project page and you can download the compiled binary along with it’s PDB file.
Thanks so much for using Paraffin! Who knew that a quick sample I wrote to learn about LINQ to XML would grow into a useful utility.… Read more
We have a new version of Visual Studio coming soon so I did the work to update my WintellectPowerShell module to support it. And, what a huge adventure that turned out to be! I will discuss why its support for Visual Studio 2017 was hard a bit later in this blog entry. For those of you who are new to WintellectPowerShell, it is a module that brings a number of useful cmdlets for setting up symbol and source servers for Visual Studio 2013-2017 as well as WinDBG. Other cmdlets automatically download and extract all the lovely goodness of the SysInternal tools, automate the analysis of lots of minidump files, and so on. The module has been helpful to me over the years. You can look at all the source code on GitHub: https://github.com/Wintellect/WintellectPowerShell. To install WintellectPowerShell directly, execute the following command in PowerShell:
If you have a previous version of WintellectPowerShell installed, you will see an ‘Authenticode issuer’ error when you try to update. The error is because since I last released a WintellectPowerShell build, my code signing certificate needed to be renewed. When PowerShellGet does checks a signed module, it checks all the certificate fields.… Read more
Having purchased a 15 inch MacBook Pro with Touch Bar recently, I’ve been having a good time seeing how that Touch Bar can be used. With applications that know about the Touch Bar, it is an interesting UI approach. But with many macOS applications not having full Touch Bar support, I’ll reserve full judgment until most apps support it. I will say that the Photos app shows a tremendously useful way to use the Touch Bar.
One app I use all the time, the virtual machine program Parallels, does not currently support the Touch Bar, so whenever you are in it, you see the default Touch Bar view:
The only problem is that for Windows development, you really, really need those function keys. Sure you can press the FN key to have them come back, but I wanted the function keys to be the default. A little poking around in System Preferences, Keyboard settings, Shortcuts, showed the Function Keys section. I added Parallels Desktop to the list and, voila, now Parallels defaults to showing the function keys whenever Parallels has focus. Not the most earth shattering of tips, but one that certainly made my life better.
Now if only Apple would sell a Touch Bar external keyboard…… Read more
When a developer says they are debugging their code, that really means they are doing some superficial looking in the debugger. Today’s debuggers are so much more powerful than most developers realize. With a little bit of training they can easily cut the time they spend debugging by 20 percent. That means more time spent on features that customers want, which means more revenue for the company. Even more important is learning how to deal with problems that occur in production. Very few developers know anything about the real tools used to quickly solve those production problems.
If you would like to learn more about debugging using Visual Studio and its amazing breakpoint capabilities, make sure to attend this free one-hour webinar, ‘Taking a Break in the Debugger,’ led by John Robbins, the head of Wintellect’s Debugging Service and a prolific author/speaker on all things related to debugging. Click on the video above to view, and let us know your feedback in the comments.… Read more
A while ago I whipped up a small utility to search for filenames at the command line. I noticed recently that it did not handle long filenames over 260 (MAX_PATH) characters. Having a few spare minutes I updated FastFileFinder to use the Win32 API directly as the .NET Framework Directory methods do not have that support. Additionally, I took at idea from Josh Carroll and batched up the matching filename output to minimize the calls to Console.WriteLine.
With that little bit of work FastFileFinder is now 30%-50% faster! I haven’t looked too much harder but I think there’s some more speed up work that can be done. Are you up for the challenge? How much faster can you make it go?
Grab the code here: https://github.com/Wintellect/FastFileFinder
Grab the compiled binary here: https://github.com/Wintellect/FastFileFinder/releases/tag/v2.0… Read more
Getting and installing modules is easier than ever with the PowerShell Gallery and PowerShellGet. Instead of downloading and extracting files into your PowerShell modules directory, a simple call to Install-Module takes care of everything for you. Today I’ve published my WintellectPowerShell module. Now you can install and get started setting up Visual Studio to access symbol server, source servers, and many other cmdlets for debugging support. All you need to do with PowerShell 5.0 (or by adding the Package Management Preview to PowerShell versions 3 or 4) is issue the following command:
If you haven’t heard of WintellectPowerShell, here are all the commands it offers.
On my production machine, my Apple MacBook Pro, I did an in place upgrade from Windows 8.1 to Windows 10. I ran into a couple of bumps and got them figured out so I thought I’d post this for others seeing the same problems. That way when combined with the power of Greyskull (AKA internet search engines) they can get answers if they hit the same issues.
The first issue I ran into had nothing to do with the MacBook Pro. I’d been short on disk space so pushed my 7 GB C:\Windows\Installer\$PatchCache$ directory to another drive with a directory link. That worked fine in Windows 8.1, but about 40% through the pre boot processing in Windows 10 setup I’d get the awesome “Something Happened” error. I’d made a strong mental note that I’d moved the $PatchCatch$ directory so that was the first thing I fixed. I had to make some room on the drive so did things like deleting my Outlook .OST file, which would get recreated the next time I started Outlook.
With 9 GB free on my C: drive, and $PatchCache$ in the proper location, I tried again. The upgrade was smooth sailing at that point. Once I logged into Windows 10, and deleted Windows.Old through the Disk Cleanup Utility, I was thrilled to see my 8 GB fee space had jumped to 19.2 GB.… Read more
How many clicks has this dialog eaten out of your life?
The idea for the warning is good because, you know, SECURITY. However, if you’re developing web apps or anything running in IIS, this gets old by the thousandth time you click the Attach button. It’s easy to turn off with an undocumented registry key. Make sure to shut down all instances of VS before changing this key as it will get overwritten on shutdown.
For Visual Studio 2015: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\Debugger
For Visual Studio 2013: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\Debugger
In the Debugger key, add a REG_DWORD value of DisableAttachSecurityWarning and set it to 1, and you now have one less click when you attach to a process.… Read more
When debugging a nasty problem in your code, one of the most helpful things you can get is a minidump. With that picture of what your app was doing at the time of the crash, hang, or when the memory started spiking, you’ve got a big hint to jumpstart your exploring. While there’s a bunch of tools out there, such as the wonderful ProcDump, and the debuggers themselves to create minidumps, the real moment of truth is when you have to look at those minidump. That’s easy to do with one or two, but what happens if you have 200? In my line of work, where I debug other’s software problems (and will be glad to help you with yours), I’m routinely faced with hundreds of dumps from a client. As much as I would like to carefully open each minidump and lovingly type the same commands over and over for the greatest consulting billing statement ever, I just can’t get my clients to pay for that.
What I really need is a way to say, “Here’s a bunch of .DMP files; go run these WinDBG commands across all of them.” It turns out that accomplishing that basic task is not hard at all when you combine a little WinDBG knowledge with a little PowerShell magic.… Read more
Now that Visual Studio 2015 RC is fresh off the build machines and available for everyone, I’ve updated my Wintellect.Analyzers project (http://johnr.us/1bEO4h8) with full RC support. Go forth and add them to your project so you can get the benefit of advanced compiler analysis and code fixes. To add the analyzers, hit up your Package Manager Console with the following command:
I guess you could go through the fancy new NuGet window in Visual Studio, but you want to be hard core and use PowerShell in VS!
If you’re interested in writing your own analyzers, as I have discussed previously, you’re immediately going to run into errors and warnings with projects based off the default Roslyn template when you try to install your analyzer masterpiece. Here’s what you’ll see:
Attempting to gather dependencies information for package ‘Analyzer18.104.22.168’ with respect to project targeting ‘.NETPortable, Version=v4.5, Profile=Profile7’
Attempting to resolve dependencies for package ‘Analyzer22.214.171.124’ with DependencyBehavior ‘Lowest’
Resolving actions to install package ‘Analyzer126.96.36.199’
Resolved actions to install package ‘Analyzer188.8.131.52’
Adding package ‘Analyzer1 184.108.40.206’ to folder ‘c:\junk\code\Analyzer1\packages’
Added package ‘Analyzer1 220.127.116.11’ to folder ‘c:\junk\code\Analyzer1\packages’
Added package ‘Analyzer1 18.104.22.168’ to ‘packages.config’
Executing script file ‘c:\junk\code\Analyzer1\packages\Analyzer22.214.171.124.0\tools\install.ps1’
Get-ChildItem : Cannot find path ‘C:\junk\code\Analyzer1\packages\Analyzer126.96.36.199.0\tools\analyzers\C#’ because it does not exist.… Read more