Non-standard transaction – NBitcoin get signature unsigned

After creating a new NBitcoin transaction (with a single non-standard script payment entry and multiple exits), is there any way to calculate the transaction signature and place it manually in the entries[0].ScriptSig, along with other parameters used by the script?

A related problem is that when you try to sign the transaction, an exception is thrown "ThePubKey script is not supported". Is that because of the non-standard script in the input?