public void CraeteProviderFactoryFact() { var ns = @"Data"; var output = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName(), ns); ns = string.IsNullOrWhiteSpace(ns) ? "" : string.Format(@".{0}", ns); var context = new ProviderFactoryContext { Namespace = new Namespace(NAMESPACE, ns), Imports = new[] {@"System", @"System.Data.Common", @"System.Configuration", @"kkkkkkaaaaaa.Data.Common",}, TypeName = new TypeName(@"TestProviderFactory"), ConnectionStringSectionName = @"db", InvariantName = @"USystem.Data.SqlClient", OutputPath = output, }; var provider = new ProviderFactory(context); provider.CreateFactory(); TextTemplatingProcess.StartExplorer(context.OutputPath); }