Saturday, 2 January 2021

Startup apps in Windows 10

https://www.msftnext.com/manage-windows-10-startup-apps/

1. Task Manager

2. Startup folder:

C:\Users\<User>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

or %appdata%\Microsoft\Windows\Start Menu\Programs\Startup

3. Registry

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

and

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

4. Store app startup

Settings - Apps - Startup

5. Task Scheduler


Tuesday, 29 December 2020

Open Source HTML to PDF converter

The software I inherited included a function for converting an HTML quote into a PDF.

It used a library from a 3rd party vendor, Winnovative Software. As I was re-hosting the server from IaaS to Azure App Services, I found that the library didn't work under the sandboxed App Service environment.

A different component was required, but it was covered under my license. But then I discovered that my license was for V14 and the new version was V15.

Could I download the previous version - the one I paid for? No. "It was over 2 years old" the company told me. They no longer provided download links. I would have to pay to upgrade.

So 2 years old is deemed too old to support now. And I would have to pay to get the later version to get features I didn't need nor want.

I thought this was rather unfair practice and so I did some more research.

And I stumbled across the excellent open source wkhtmltopdf tool. And even better, Adam Hockemeyer provided a docker image that did exactly what I needed - it hosted the tool as a .NET Core Web service in Azure App Service.

Max Kudos to Adam - you saved me hours and hours of effort, and prevented me rewarding bad support behaviour.

Wednesday, 23 December 2020

ASP.NET Core: FileNotFoundException: Could not load file or assembly

 I had a complex solution with multiple projects and NuGet references.

To debug one troublesome Nuget package, I removed the Nuget reference and added a project reference so I could step through the code.

However when the website ran, it would throw the error:

FileNotFoundException: Could not load file or assembly <troublesome assembly>

Investigation

  1. procmon.exe indicated that the website wasn't even loading the assembly - or trying to
  2. <website>.deps.json didn't have a reference to the assembly
  3. Visual Studio Resharper was showing the following popup:


Conclusions

The problem was that I had added the project to the solution, but the project was located in a folder outside of the root solution folder. By taking a copy inside of the root solution folder and re-adding the reference, the <website>.deps.json then included the reference and the assembly loaded.

  1. Check your <website>.deps.json 
  2. Use ProcMon
  3. Make sure that the project referenced is inside your solution folder.


Tuesday, 24 November 2020

Move To iOS - transfer interrupted problem

A common problem described on the reviews of the "Move to iOS" app is that people are being constantly disconnected when transferring files and settings.

FIXED THE TRANSFER INTERRUPTED PROBLEM

What is happening is your Android connects to a local hotspot created on the iPhone. You will notice that the Wifi indicator on the Android has an exclamation mark. This is because it detects it cannot reach the internet, so it disconnects and tries your home LAN again.


Go to Network Settings and FORGET YOUR EXISTING WIFI connections so it cannot reconnect to your home wifi. Then it is forced to stay on the iPhone hotspot.

Sunday, 8 November 2020

Git Settings

Git Difftool with Beyond Compare 3

git config --global diff.tool bc

git config --global difftool.bc.path "C:\Program Files (x86)\Beyond Compare 3\BComp.exe"

git config --global difftool.prompt false

git config --global merge.tool bc

git config --global mergetool.bc.path "C:\Program Files (x86)\Beyond Compare 3\BComp.exe"

git config --global alias.mydiff "difftool --dir-diff --tool=bc --no-prompt"

Git Difftool with Beyond Compare 3 - Linux

git config --global diff.tool bc

git config --global difftool.bc.path '/mnt/c/Program Files (x86)/Beyond Compare 3/BComp.exe'

git config --global difftool.prompt false

git config --global merge.tool bc

git config --global mergetool.bc.path '/mnt/c/Program Files (x86)/Beyond Compare 3/BComp.exe'

git config --global alias.mydiff "difftool --dir-diff --tool=bc --no-prompt"

Git Difftool with Beyond Compare 3 - WSL2

nano ~/.gitconfig

[difftool "bc"]
        cmd = '/mnt/c/Program Files (x86)/Beyond Compare 3/BComp.exe'   \"$(wslpath -aw $LOCAL)\" \"$(wslpath -aw $REMOTE)\"
        trustExitCode = true

Stack Overflow

Carriage return line feeds

Resolved: Git warning LF will be replaced by CRLF in file | vGeek - Tales from real IT system Administration environment (vcloud-lab.com)

Windows uses CRLF (\r\n) whereas Linux and MacOS just use line feed (\n).

You can turn off warnings with

git config core.autocrlf true


Wednesday, 28 October 2020

Search filters for Outlook Web

 https://support.microsoft.com/en-us/office/learn-to-narrow-your-search-criteria-for-better-searches-in-outlook-d824d1e9-a255-4c8a-8553-276fb895a8da

Thursday, 22 October 2020

VSIX install location

 Custom VSIX extensions are saved to


%LocalAppData%\Microsoft\VisualStudio\[Version]\Extensions