No. The price of a microcontroller running the .NET framework will always be greater than the price for a microcontroller with equivalent performance (or equivalent to the price of a micro with greater performance) which is programmed in assembly, C, or even using the Arduino tools.
When buying a microcontroller for the .NET framework, you pay for small transistors, you pay for more transistors, you pay for complexity, you probably pay for licensing a core developed somewhere else, and, since you're paying for all that, most manufacturers imagine that you'll want to pay for higher pin-count packages since your die budget supports them. If you did this in assembly or C, you could get equivalent performance and pay a lot less.
See also the following questions:
The first question in the list is very applicable to this question, it just discusses the suitability of the .NET micro framework as opposed to the pricing and programming which we're discussing here.
If you still want to use .NET, you think you can get acceptable performance out and you're going to be buying a significant number of parts (at least 1k, probably easier at 10k), you can do the same thing that the vendors of the FEZ parts do: Have it loaded at the factory. It costs somewhere in the region of a quarter apiece to program large files like the one you'll be working with.
Three ways of making an SSR follow :
The 1st two use FETs and can be switched off and on throughout an AC cycle as required. Switching speed need to be understood. The floating gate versions have an RC time constant that controls turnoff unless extra care is taken to avoid it.
The TRIAC circuit turns on when fired and off at the next zero crossing. It can be fired as soon as the zero crossing has passed but again, can then not be turned off until the next zero crossing. So you can get whole-half-cycles or part half cycles extending from a firing point to the end of that half cycle. Inductive loads complicate this slightly but are outside the basic discussion.
(1) Place a MOSFET inside a 4 diode bridge as the "load". Ac to bridge AC input is "shorted " = on for AC when FET is on Gate is floating so you need to get voltage to gate. Not hard but needs thought. Rough diagram - better later maybe. Transistor shown here is bipolar but MOSFET does same job. MOSFET always sees DC. Load sees AC switching. Drive gate with opto. Derive power by eg resistor feed from drain to a reservoir cap to drive gate via opto.
(2) Two eg N channel MOSFETs in series - connect source to source and gate to gate. Inputs are 2 x drains. Drive gate +ve to source to turn on. Gates to source to turn off. Again, gates and sources float so you need to get drive to them but not hard - just needs thought.
The circuit diagram below shows an example of a practical implementation of this principle.
Note that the FETS are both N-Channel and that the Sources of both FETs are connected and the Gates of both FETs are connected. This circuit works because MOSFETS are two quadrant devices - that is, an N channel FET can be turned on by a positive gate realtive to source regardless of whether Drain to Source voltage is +ve or -ve. That means that the FET can conduct "backwards" if driven in the normal manner. Two FETS are required connected in "anti series" (opposite relative polarity) because of the "body diode" inside each FET which conducts when the FET is biased oppositely to usual. If only one FET was used it would conduct when the FET was turned off when Drain was negative relative to source.
Note that "isolation" and level shifting of the on/off signal to the floating gates is achieved by the 2 x 100 pF capacitors. Consider the circuitry at right as potentially at mains potential. The right hand 74C14 forms an oscillator at about 100 kHz and the two inverters between them provide opposite polarity drive via the 2 capacitors to the 4 diodes which form a bridge rectifier. The rectifier provides DC drive to the floating FET gates. The gate capacitance is probably ~ a few nF and this is discharged by R1 when the drive signal is removed. I'd guesstimate drive removal would occur in tenths of a mililsecond but do the calculations yourself.
The circuit is from here and notes
- The circuit uses an inexpensive C-MOS inverter package and a few small capacitors to drive two power MOS transistors from a 12v to 15v supply. Since the coupling capacitor values used to drive the FETs are small, the leakage current from the power line into the control circuit is a tiny 4uA. Only about 1.5mA of DC is needed to turn on and off 400 watts of AC or DC power to a load
(3) TRIAC CIRCUIT
You specifically mentioned MOSFETs.
A TRIAC is also commonly used in AC SSRs.
Below is a typical TRIAC circuit.
L1 may not be used.
C1 & R6 form a "snubber" and values depend on load characteristics.
Best Answer
Look into something called a "Shift Register". One shift register (not suitable for driving most relay coils) is the 74HC595. There are others.
If you drive solid state relays, if the per pin current is enough and that there are no inductance that would work.