I have some code that is not compiling to an .exe file in PowerShell,
$csharp = '#CSharp code goes here'
$tmpFile = [IO.Path]::GetTempFileName() + ".cs" # Creates Temp file
Out-file -FilePath $tmpFile -InputObject $csharp # sets content
Start-Process -FilePath C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe -ArgumentList "/out:Launcher.exe" # Starts csc
When the script loads there is a popup with csc.exe that closes within milliseconds. Could anyone help? Thanks, CollinScripter
"/addmodule:$tmpFile /out:Launcher.exe bugreport:c:\WhyItFailed.txtTry that and report back