Depending on how you are planning on using it, a self signed certificate may work.
There are instructions on how to generate a using makecert and signing using signtool. There are instructions on how to create the certificate using the PKI Powershell cmdlets. Signtool would have to be used in this case.
Self signed certificates are really good for testing by people who trust you, since the certificate would have to be installed and trusted on any system that it is to be used on. If the environment has a certificate root authority, like an enterprise running its own server, then this can be used to create a code signing certificate for the business.
If the intent is to release an application into the Windows store, then there is no need to sign any packages that are uploaded to the store. Appx/Msix packages will be signed by the store certificate.
It should be implied from what I wrote, this doesn't remove the need for a code signing certificate from a public authoridy in the general case of releasing a package or an application for download and install.