hi, i tryed to build WPF application using Add-Type, but it failed.
$a = @'
using System.Windows;
public class Program
{
[STAThread()]
public static void Main(string[] args)
{
Application app = new Application();
Window1 w = new Window1();
app.Run(w);
}
}
'@
Add-Type -TypeDefinition $a -UsingNamespace "System.Windows"
Add-Type's help document doesn't have usages of -UsingNamespace (and -ReferencedAssemblies), so i dont well understand...