Category Archives: software

How to fix 8000000A error when building VDPROJ

The Microsoft Visual Studio Setup Project is an old technology to create installer developed by Microsoft. It is out of support from nearly a decade and not present in Visual Studio anymore but when I visit customer sites I find legacy technologies and I need to deal with it on the short-term.

A couple of days ago I was working on an automated CI build on Azure DevOps and we hit an issue when trying to compile an old VDPROJ (migration to Wix in progress, btw ☺). We encountered an HRESULT 8000000A error.

Continue reading

.Net Core Static Analysis with SonarQube / Project GUID

When we want to analyze a .Net Core project with SonarQube we need to make sure that our .csproj file has a <ProjectGuid> attribute.

You can generate a GUID with Visual Studio from the Tools menu: Tools, Generate GUID.

If you don’t have a GUID inside your project file SonarQube will skip the analysis.

Cheers!

Deploy a new IIS Web Site with Azure DevOps Pipelines

I was experimenting with deploying a completely new Web Site to a machine with a brand new IIS installation to see what are the required parameter to do a basic deployment.
I share here my findings.

Continue reading

Docker PowerShell commands and AutoHotKey

Commands

I’m doing quite a few exercies with Docker in the last fiew days. I start to notice that I need a toolkit of useful commands to cleanup all the containers or images that I move around.

I record here, for future memory, a collection of useful PowerShell script.

Bonus point: an AHK (AutoHotKey) script to be able to rapidly insert those commands with just a few chars!


# Maintenance commands or utils
docker container prune # Remove all stopped containers
docker volume prune # Remove all unused volumes
docker image prune # Remove unused images
docker system prune # All of the above, in this order: containers, volumes, images
docker ps -a -q | % { docker rm $_ } # Remove all containers
docker images -q | % { docker rmi $_ } # Remove all images
docker volume rm $(docker volume ls -f dangling=true -q) # Remove all volumes
https://gist.github.com/phenixita/6b3b65e58cf19ff38d9e4f44e6f79a54.js

How to create a self-signed certificate with PowerShell

When we develop web-application or experiment with some technologies it’s quite common to need a certificate. A certificate for real world scenarios can be expensive and it’s over-engineering for testing purposes. So with this simple PowerShell script (on Windows) we can create a self-signed certificate for development enviroments.

$cert = New-SelfSignedCertificate -DnsName mydemowebapp.net -CertStoreLocation cert:\LocalMachine\My

$pwd = ConvertTo-SecureString -String "MyPassword" -Force -AsPlainText

Export-PfxCertificate -Cert $cert -FilePath C:\temp\cert.pfx -Password $pwd

With these few line of codes we create and store a self-signed certificate in the Windows Certificate Store. With the last line (Export-PfxCertificate) we export the certificate for furher use for example to do some experiments with cloud providers.

Reference

GitHub Gist

GLV OnAir Febbraio 2019 – Video Link

Qualche settimana fa GLV ha trasmesso il suo episodio di GLV OnAir di febbraio 2019. La puntata è andata in onda col solito formato di 3 sessioni da 30 minuti ciascuna che elenco qui di seguito:

Azure DevOps – Undelete a Release Pipeline

A few months ago I deleted a folder with inside a release definition.
My friend Alessandro Alpi helped me a lot pointing me to this msdn article.
With the PowerShell script that you find following the link you can restore a deleted release pipeline but only within 4 weeks of the deletion.

Continue reading

Marco e Andrea

Questo post è dedicato a Marco e ad Andrea.

Le trasferte in macchina con le infinite chiacchierate degli argomenti più disparati e disperati, le lunghe telefonate, le incazzature, le installazioni dai clienti con i modem a chiavette 3G, gli errori, i successi, le assistenze in treno ai clienti collegati in hotspot ai 200 e passa kmh, gli aperitivi in aeroporto incastrando le coincidenze coi voli, sono solo alcune delle esperienze fatte insieme che porterò sempre con me. Elencarle qui tutte sarebbe impossibile.

Siete stati due compagni di viaggio memorabili da cui ho imparato moltissimo in questi nove anni.

Auguro a chiunque di trovare nella vita delle persone così con cui poter lavorare.

Grazie di tutto. È stato un piacere.

Visual Studio Debug – Tips And Tricks – Part 1

We use Visual Studio many hours a day but can we say that we know all the tips and tricks?

Here I share a brief collection of 3 debugging tips that I collected.

Step into specific

This feature is helpful when we have a situation like below. We set a breakpoint in line 9 and when the program counter hits that point. Now we would like to jump directly into Spagetti() without stepping into Parmiggiano(). To do so we right-click the program-counter line, Step Into Specific and then Spaghetti().

Run To Cursor (CTRL + F10)

If we have a situation like the following picture we may want to run to line 20 without stepping-over (F10) many times. With Run To Cursor we can run to the statement where our cursors is located and stop there. We can do this with right click, Run To Cursor or with the CTRL+F10 keyboard shortcut.

Peek definition

If we want to look quickly without changing context to a definition of a method or class we can use the ALT+F12 keyboard shortcut. It opens a frame inside our current code to show details of what we selected.

TL; DR

In future posts I’ll share other tricks! Stay tuned!