Пример #1
0
        private static void CreateProject(IList <DbTable> dts)
        {
            string path = BaseParams.WcfServicesPath;

            if (Directory.Exists(path) == false)
            {
                Directory.CreateDirectory(path);
            }
            string filepath = Path.Combine(path, BaseParams.WcfServicesNameSpace + ".csproj");

            FileStream   file = new FileStream(filepath, FileMode.Create);
            StreamWriter sw   = new StreamWriter(file, Encoding.UTF8);

            sw.WriteLine("<Project ToolsVersion=\"3.5\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
            sw.WriteLine("  <PropertyGroup>");
            sw.WriteLine("    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
            sw.WriteLine("    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
            sw.WriteLine("    <ProductVersion>9.0.30729</ProductVersion>");
            sw.WriteLine("    <SchemaVersion>2.0</SchemaVersion>");
            sw.WriteLine("    <ProjectGuid>{" + BaseParams.WcfServicesNo + "}</ProjectGuid>");
            sw.WriteLine("    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>");
            sw.WriteLine("    <OutputType>Library</OutputType>");
            sw.WriteLine("    <AppDesignerFolder>Properties</AppDesignerFolder>");
            sw.WriteLine("    <RootNamespace>" + BaseParams.WcfServicesNameSpace + "</RootNamespace>");
            sw.WriteLine("    <AssemblyName>" + BaseParams.WcfServicesNameSpace + "</AssemblyName>");
            sw.WriteLine("    <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">");
            sw.WriteLine("    <DebugSymbols>true</DebugSymbols>");
            sw.WriteLine("    <DebugType>full</DebugType>");
            sw.WriteLine("    <Optimize>false</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>DEBUG;TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">");
            sw.WriteLine("    <DebugType>pdbonly</DebugType>");
            sw.WriteLine("    <Optimize>true</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Reference Include=\"System\" />");
            sw.WriteLine("    <Reference Include=\"System.Data\" />");
            sw.WriteLine("    <Reference Include=\"System.Drawing\" />");
            sw.WriteLine("    <Reference Include=\"System.Runtime.Serialization\">");
            sw.WriteLine("      <RequiredTargetFramework>3.0</RequiredTargetFramework>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("    <Reference Include=\"System.ServiceModel\">");
            sw.WriteLine("      <RequiredTargetFramework>3.0</RequiredTargetFramework>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("    <Reference Include=\"System.Web\" />");
            sw.WriteLine("    <Reference Include=\"System.Xml\" />");
            sw.WriteLine("    <Reference Include=\"System.Configuration\" />");
            sw.WriteLine("    <Reference Include=\"System.Web.Services\" />");
            sw.WriteLine("    <Reference Include=\"System.EnterpriseServices\" />");
            sw.WriteLine("    <Reference Include=\"System.Web.Mobile\" />");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Content Include=\"hibernate.cfg.xml\">");
            sw.WriteLine("      <CopyToOutputDirectory>Always</CopyToOutputDirectory>");
            sw.WriteLine("    </Content>");
            sw.WriteLine("    <Content Include=\"log4net.config\">");
            sw.WriteLine("      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>");
            sw.WriteLine("    </Content>");
            sw.WriteLine("    <Content Include=\"MainService.svc\" />");
            sw.WriteLine("    <Content Include=\"Web.config\" />");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Compile Include=\"Properties\\AssemblyInfo.cs\" />");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.WcfModelsNameSpace + "\\" + BaseParams.WcfModelsNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.WcfModelsNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.WcfModelsNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Folder Include=\"App_Data\\\" />");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />");
            sw.WriteLine("  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\VisualStudio\\v9.0\\WebApplications\\Microsoft.WebApplication.targets\" />");
            sw.WriteLine("  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. ");
            sw.WriteLine("       Other similar extension points exist, see Microsoft.Common.targets.");
            sw.WriteLine("  <Target Name=\"BeforeBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  <Target Name=\"AfterBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  -->");
            sw.WriteLine("  <ProjectExtensions>");
            sw.WriteLine("    <VisualStudio>");
            sw.WriteLine("      <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">");
            sw.WriteLine("        <WebProjectProperties>");
            sw.WriteLine("          <UseIIS>False</UseIIS>");
            sw.WriteLine("          <AutoAssignPort>True</AutoAssignPort>");
            sw.WriteLine("          <DevelopmentServerPort>" + BaseParams.WcfServicePort + "</DevelopmentServerPort>");
            sw.WriteLine("          <DevelopmentServerVPath>/</DevelopmentServerVPath>");
            sw.WriteLine("          <IISUrl>");
            sw.WriteLine("          </IISUrl>");
            sw.WriteLine("          <NTLMAuthentication>False</NTLMAuthentication>");
            sw.WriteLine("          <UseCustomServer>False</UseCustomServer>");
            sw.WriteLine("          <CustomServerUrl>");
            sw.WriteLine("          </CustomServerUrl>");
            sw.WriteLine("          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>");
            sw.WriteLine("        </WebProjectProperties>");
            sw.WriteLine("      </FlavorProperties>");
            sw.WriteLine("    </VisualStudio>");
            sw.WriteLine("  </ProjectExtensions>");
            sw.WriteLine("</Project>");
            sw.Close();
            file.Close();
            AssemblyInfoCoder.Write(path, BaseParams.WcfServicesNameSpace, BaseParams.WcfServicesNo);
        }
Пример #2
0
        private static void CreateProject(IList <DbTable> dts)
        {
            string path = BaseParams.WcfModelsPath;

            if (Directory.Exists(path) == false)
            {
                Directory.CreateDirectory(path);
            }
            string filepath = Path.Combine(path, BaseParams.WcfModelsNameSpace + ".csproj");

            FileStream   file = new FileStream(filepath, FileMode.Create);
            StreamWriter sw   = new StreamWriter(file, Encoding.UTF8);

            sw.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
            sw.WriteLine("<Project ToolsVersion=\"3.5\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
            sw.WriteLine("  <PropertyGroup>");
            sw.WriteLine("    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
            sw.WriteLine("    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
            sw.WriteLine("    <ProductVersion>9.0.30729</ProductVersion>");
            sw.WriteLine("    <SchemaVersion>2.0</SchemaVersion>");
            sw.WriteLine("    <ProjectGuid>{" + BaseParams.WcfModelsNo + "}</ProjectGuid>");
            sw.WriteLine("    <OutputType>Library</OutputType>");
            sw.WriteLine("    <AppDesignerFolder>Properties</AppDesignerFolder>");
            sw.WriteLine("    <RootNamespace>" + BaseParams.WcfModelsNameSpace + "</RootNamespace>");
            sw.WriteLine("    <AssemblyName>" + BaseParams.WcfModelsNameSpace + "</AssemblyName>");
            sw.WriteLine("    <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>");
            sw.WriteLine("    <FileAlignment>512</FileAlignment>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">");
            sw.WriteLine("    <DebugSymbols>true</DebugSymbols>");
            sw.WriteLine("    <DebugType>full</DebugType>");
            sw.WriteLine("    <Optimize>false</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\Debug\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>DEBUG;TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">");
            sw.WriteLine("    <DebugType>pdbonly</DebugType>");
            sw.WriteLine("    <Optimize>true</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\Release\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Reference Include=\"NHibernate, Version=2.0.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL\">");
            sw.WriteLine("      <SpecificVersion>False</SpecificVersion>");
            sw.WriteLine("      <HintPath>..\\External_bin\\NHibernate.dll</HintPath>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("    <Reference Include=\"log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL\">");
            sw.WriteLine("      <SpecificVersion>False</SpecificVersion>");
            sw.WriteLine("      <HintPath>..\\External_bin\\log4net.dll</HintPath>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("    <Reference Include=\"System\" />");
            sw.WriteLine("    <Reference Include=\"System.Data\" />");
            sw.WriteLine("    <Reference Include=\"System.Runtime.Serialization\">");
            sw.WriteLine("      <RequiredTargetFramework>3.0</RequiredTargetFramework>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("    <Reference Include=\"System.ServiceModel\">");
            sw.WriteLine("      <RequiredTargetFramework>3.0</RequiredTargetFramework>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("    <Reference Include=\"System.IdentityModel\">");
            sw.WriteLine("      <RequiredTargetFramework>3.0</RequiredTargetFramework>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("    <Reference Include=\"System.Xml\" />");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Compile Include=\"Properties\\AssemblyInfo.cs\" />");
            sw.WriteLine("    <Compile Include=\"MyUserNamePasswordValidator.cs\" />");
            sw.WriteLine("    <Compile Include=\"IMainService.cs\" />");
            sw.WriteLine("    <Compile Include=\"MainService.cs\" />");
            sw.WriteLine("    <Compile Include=\"MyWcfTranserObject.cs\" />");
            sw.WriteLine("    <Compile Include=\"NHibernateUnProxyHelper.cs\" />");
            sw.WriteLine("    <Compile Include=\"MainServiceFactory.cs\" />");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.PersistenceNameSpace + "\\" + BaseParams.PersistenceNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.PersistenceNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.PersistenceNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.ServicesNameSpace + "\\" + BaseParams.ServicesNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.ServicesNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.ServicesNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.DomainNameSpace + "\\" + BaseParams.DomainNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.DomainNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.DomainNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.UtilityNameSpace + "\\" + BaseParams.UtilityNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.UtilityNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.UtilityNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />");
            sw.WriteLine("  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. ");
            sw.WriteLine("       Other similar extension points exist, see Microsoft.Common.targets.");
            sw.WriteLine("  <Target Name=\"BeforeBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  <Target Name=\"AfterBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  -->");
            sw.WriteLine("</Project>");
            sw.Close();
            file.Close();
            AssemblyInfoCoder.Write(path, BaseParams.WcfModelsNameSpace, BaseParams.WcfModelsNo);
        }
Пример #3
0
        private static void CreateProject(IList <DbTable> dts)
        {
            string path = BaseParams.WinFromsPath;

            if (Directory.Exists(path) == false)
            {
                Directory.CreateDirectory(path);
            }
            string filepath = Path.Combine(path, BaseParams.WinFromsNameSpace + ".csproj");

            FileStream   file = new FileStream(filepath, FileMode.Create);
            StreamWriter sw   = new StreamWriter(file, Encoding.UTF8);

            sw.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
            sw.WriteLine("<Project ToolsVersion=\"3.5\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
            sw.WriteLine("  <PropertyGroup>");
            sw.WriteLine("    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
            sw.WriteLine("    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
            sw.WriteLine("    <ProductVersion>9.0.30729</ProductVersion>");
            sw.WriteLine("    <SchemaVersion>2.0</SchemaVersion>");
            sw.WriteLine("    <ProjectGuid>{" + BaseParams.WinFromsNo + "}</ProjectGuid>");
            sw.WriteLine("    <OutputType>Library</OutputType>");
            sw.WriteLine("    <AppDesignerFolder>Properties</AppDesignerFolder>");
            sw.WriteLine("    <RootNamespace>" + BaseParams.WinFromsNameSpace + "</RootNamespace>");
            sw.WriteLine("    <AssemblyName>" + BaseParams.WinFromsNameSpace + "</AssemblyName>");
            sw.WriteLine("    <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>");
            sw.WriteLine("    <FileAlignment>512</FileAlignment>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">");
            sw.WriteLine("    <DebugSymbols>true</DebugSymbols>");
            sw.WriteLine("    <DebugType>full</DebugType>");
            sw.WriteLine("    <Optimize>false</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\Debug\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>DEBUG;TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">");
            sw.WriteLine("    <DebugType>pdbonly</DebugType>");
            sw.WriteLine("    <Optimize>true</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\Release\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Reference Include=\"System\" />");
            sw.WriteLine("    <Reference Include=\"System.Data\" />");
            sw.WriteLine("    <Reference Include=\"System.Drawing\" />");
            sw.WriteLine("    <Reference Include=\"System.ServiceModel\">");
            sw.WriteLine("      <RequiredTargetFramework>3.0</RequiredTargetFramework>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("    <Reference Include=\"System.Windows.Forms\" />");
            sw.WriteLine("    <Reference Include=\"System.Xml\" />");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Compile Include=\"Properties\\AssemblyInfo.cs\" />");
            sw.WriteLine("    <Compile Include=\"DialogEditType.cs\" />");
            foreach (DbTable dt in dts)
            {
                sw.WriteLine("    <Compile Include=\"EditDialogs\\dlg" + dt.TitleCaseName + "Edit.cs\">");
                sw.WriteLine("      <SubType>Form</SubType>");
                sw.WriteLine("    </Compile>");
                sw.WriteLine("    <Compile Include=\"EditDialogs\\dlg" + dt.TitleCaseName + "Edit.Designer.cs\">");
                sw.WriteLine("      <DependentUpon>dlg" + dt.TitleCaseName + "Edit.cs</DependentUpon>");
                sw.WriteLine("    </Compile>");
            }
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            foreach (DbTable dt in dts)
            {
                sw.WriteLine("    <Compile Include=\"ManagerForms\\frm" + dt.TitleCaseName + "Mng.cs\">");
                sw.WriteLine("      <SubType>Form</SubType>");
                sw.WriteLine("    </Compile>");
                sw.WriteLine("    <Compile Include=\"ManagerForms\\frm" + dt.TitleCaseName + "Mng.Designer.cs\">");
                sw.WriteLine("      <DependentUpon>frm" + dt.TitleCaseName + "Mng.cs</DependentUpon>");
                sw.WriteLine("    </Compile>");
            }
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            foreach (DbTable dt in dts)
            {
                sw.WriteLine("    <EmbeddedResource Include=\"EditDialogs\\dlg" + dt.TitleCaseName + "Edit.resx\">");
                sw.WriteLine("      <DependentUpon>dlg" + dt.TitleCaseName + "Edit.cs</DependentUpon>");
                sw.WriteLine("    </EmbeddedResource>");
            }
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            foreach (DbTable dt in dts)
            {
                sw.WriteLine("    <EmbeddedResource Include=\"ManagerForms\\frm" + dt.TitleCaseName + "Mng.resx\">");
                sw.WriteLine("      <DependentUpon>frm" + dt.TitleCaseName + "Mng.cs</DependentUpon>");
                sw.WriteLine("      <SubType>Designer</SubType>");
                sw.WriteLine("    </EmbeddedResource>");
            }
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.ControlsNameSpace + "\\" + BaseParams.ControlsNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.ControlsNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.ControlsNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.DomainNameSpace + "\\" + BaseParams.DomainNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.DomainNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.DomainNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.UtilityNameSpace + "\\" + BaseParams.UtilityNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.UtilityNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.UtilityNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.UserControlsNameSpace + "\\" + BaseParams.UserControlsNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.UserControlsNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.UserControlsNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.WcfClientNameSpace + "\\" + BaseParams.WcfClientNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.WcfClientNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.WcfClientNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />");
            sw.WriteLine("  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. ");
            sw.WriteLine("       Other similar extension points exist, see Microsoft.Common.targets.");
            sw.WriteLine("  <Target Name=\"BeforeBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  <Target Name=\"AfterBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  -->");
            sw.WriteLine("</Project>");
            sw.Close();
            file.Close();
            AssemblyInfoCoder.Write(path, BaseParams.WinFromsNameSpace, BaseParams.WinFromsNo);
        }
Пример #4
0
        private static void CreateProject(IList <DbTable> dts)
        {
            string path = BaseParams.RunPath;

            if (Directory.Exists(path) == false)
            {
                Directory.CreateDirectory(path);
            }
            string filepath = Path.Combine(path, BaseParams.RunNameSpace + ".csproj");

            FileStream   file = new FileStream(filepath, FileMode.Create);
            StreamWriter sw   = new StreamWriter(file, Encoding.UTF8);

            sw.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
            sw.WriteLine("<Project ToolsVersion=\"3.5\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
            sw.WriteLine("  <PropertyGroup>");
            sw.WriteLine("    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
            sw.WriteLine("    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
            sw.WriteLine("    <ProductVersion>9.0.30729</ProductVersion>");
            sw.WriteLine("    <SchemaVersion>2.0</SchemaVersion>");
            sw.WriteLine("    <ProjectGuid>{" + BaseParams.RunNo + "}</ProjectGuid>");
            sw.WriteLine("    <OutputType>WinExe</OutputType>");
            sw.WriteLine("    <AppDesignerFolder>Properties</AppDesignerFolder>");
            sw.WriteLine("    <RootNamespace>" + BaseParams.RunNameSpace + "</RootNamespace>");
            sw.WriteLine("    <AssemblyName>" + BaseParams.RunNameSpace + "</AssemblyName>");
            sw.WriteLine("    <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>");
            sw.WriteLine("    <FileAlignment>512</FileAlignment>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">");
            sw.WriteLine("    <DebugSymbols>true</DebugSymbols>");
            sw.WriteLine("    <DebugType>full</DebugType>");
            sw.WriteLine("    <Optimize>false</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\Debug\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>DEBUG;TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">");
            sw.WriteLine("    <DebugType>pdbonly</DebugType>");
            sw.WriteLine("    <Optimize>true</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\Release\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Reference Include=\"System\" />");
            sw.WriteLine("    <Reference Include=\"System.Data\" />");
            sw.WriteLine("    <Reference Include=\"System.Deployment\" />");
            sw.WriteLine("    <Reference Include=\"System.Drawing\" />");
            sw.WriteLine("    <Reference Include=\"System.Runtime.Serialization\">");
            sw.WriteLine("      <RequiredTargetFramework>3.0</RequiredTargetFramework>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("    <Reference Include=\"System.ServiceModel\">");
            sw.WriteLine("      <RequiredTargetFramework>3.0</RequiredTargetFramework>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("    <Reference Include=\"System.Windows.Forms\" />");
            sw.WriteLine("    <Reference Include=\"System.Xml\" />");
            sw.WriteLine("    <Reference Include=\"log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL\">");
            sw.WriteLine("      <SpecificVersion>False</SpecificVersion>");
            sw.WriteLine("      <HintPath>..\\External_bin\\log4net.dll</HintPath>");
            sw.WriteLine("    </Reference>");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Compile Include=\"MDIParent.cs\">");
            sw.WriteLine("      <SubType>Form</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MDIParent.Designer.cs\">");
            sw.WriteLine("      <DependentUpon>MDIParent.cs</DependentUpon>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"Program.cs\" />");
            sw.WriteLine("    <Compile Include=\"Properties\\AssemblyInfo.cs\" />");
            sw.WriteLine("    <EmbeddedResource Include=\"MDIParent.resx\">");
            sw.WriteLine("      <DependentUpon>MDIParent.cs</DependentUpon>");
            sw.WriteLine("    </EmbeddedResource>");
            sw.WriteLine("    <EmbeddedResource Include=\"Properties\\Resources.resx\">");
            sw.WriteLine("      <Generator>ResXFileCodeGenerator</Generator>");
            sw.WriteLine("      <LastGenOutput>Resources.Designer.cs</LastGenOutput>");
            sw.WriteLine("      <SubType>Designer</SubType>");
            sw.WriteLine("    </EmbeddedResource>");
            sw.WriteLine("    <Compile Include=\"Properties\\Resources.Designer.cs\">");
            sw.WriteLine("      <AutoGen>True</AutoGen>");
            sw.WriteLine("      <DependentUpon>Resources.resx</DependentUpon>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <None Include=\"app.config\" />");
            sw.WriteLine("    <None Include=\"log4net.config\">");
            sw.WriteLine("      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>");
            sw.WriteLine("    </None>");
            sw.WriteLine("    <None Include=\"Properties\\Settings.settings\">");
            sw.WriteLine("      <Generator>SettingsSingleFileGenerator</Generator>");
            sw.WriteLine("      <LastGenOutput>Settings.Designer.cs</LastGenOutput>");
            sw.WriteLine("    </None>");
            sw.WriteLine("    <Compile Include=\"Properties\\Settings.Designer.cs\">");
            sw.WriteLine("      <AutoGen>True</AutoGen>");
            sw.WriteLine("      <DependentUpon>Settings.settings</DependentUpon>");
            sw.WriteLine("      <DesignTimeSharedInput>True</DesignTimeSharedInput>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.ControlsNameSpace + "\\" + BaseParams.ControlsNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.ControlsNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.ControlsNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.DomainNameSpace + "\\" + BaseParams.DomainNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.DomainNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.DomainNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.UtilityNameSpace + "\\" + BaseParams.UtilityNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.UtilityNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.UtilityNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.UserControlsNameSpace + "\\" + BaseParams.UserControlsNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.UserControlsNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.UserControlsNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.WcfClientNameSpace + "\\" + BaseParams.WcfClientNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.WcfClientNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.WcfClientNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("    <ProjectReference Include=\"..\\" + BaseParams.WinFromsNameSpace + "\\" + BaseParams.WinFromsNameSpace + ".csproj\">");
            sw.WriteLine("      <Project>{" + BaseParams.WinFromsNo + "}</Project>");
            sw.WriteLine("      <Name>" + BaseParams.WinFromsNameSpace + "</Name>");
            sw.WriteLine("    </ProjectReference>");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />");
            sw.WriteLine("  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. ");
            sw.WriteLine("       Other similar extension points exist, see Microsoft.Common.targets.");
            sw.WriteLine("  <Target Name=\"BeforeBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  <Target Name=\"AfterBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  -->");
            sw.WriteLine("</Project>");
            sw.Close();
            file.Close();
            AssemblyInfoCoder.Write(path, BaseParams.RunNameSpace, BaseParams.RunNo);
        }
Пример #5
0
        private static void CreateProject(IList <DbTable> dts)
        {
            string path = BaseParams.ControlsPath;

            if (Directory.Exists(path) == false)
            {
                Directory.CreateDirectory(path);
            }
            string filepath = Path.Combine(path, BaseParams.CompanyName + ".Controls.csproj");

            FileStream   file = new FileStream(filepath, FileMode.Create);
            StreamWriter sw   = new StreamWriter(file, Encoding.UTF8);

            sw.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
            sw.WriteLine("<Project ToolsVersion=\"3.5\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
            sw.WriteLine("  <PropertyGroup>");
            sw.WriteLine("    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
            sw.WriteLine("    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
            sw.WriteLine("    <ProductVersion>9.0.21022</ProductVersion>");
            sw.WriteLine("    <SchemaVersion>2.0</SchemaVersion>");
            sw.WriteLine("    <ProjectGuid>{" + BaseParams.ControlsNo + "}</ProjectGuid>");
            sw.WriteLine("    <OutputType>Library</OutputType>");
            sw.WriteLine("    <AppDesignerFolder>Properties</AppDesignerFolder>");
            sw.WriteLine("    <RootNamespace>" + BaseParams.CompanyName + ".Controls</RootNamespace>");
            sw.WriteLine("    <AssemblyName>" + BaseParams.CompanyName + ".Controls</AssemblyName>");
            sw.WriteLine("    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>");
            sw.WriteLine("    <FileAlignment>512</FileAlignment>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">");
            sw.WriteLine("    <DebugSymbols>true</DebugSymbols>");
            sw.WriteLine("    <DebugType>full</DebugType>");
            sw.WriteLine("    <Optimize>false</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\Debug\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>DEBUG;TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">");
            sw.WriteLine("    <DebugType>pdbonly</DebugType>");
            sw.WriteLine("    <Optimize>true</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\Release\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Reference Include=\"System\" />");
            sw.WriteLine("    <Reference Include=\"System.Data\" />");
            sw.WriteLine("    <Reference Include=\"System.Drawing\" />");
            sw.WriteLine("    <Reference Include=\"System.Windows.Forms\" />");
            sw.WriteLine("    <Reference Include=\"System.Xml\" />");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Compile Include=\"MyGroupBox.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"IControlBind.cs\" />");
            sw.WriteLine("    <Compile Include=\"MyButton.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyComboBox.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyDataGridView.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyDateTimePicker.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyDialog.cs\">");
            sw.WriteLine("      <SubType>Form</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyErrorProvider.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyForm.cs\">");
            sw.WriteLine("      <SubType>Form</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyLabel.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyMaskedTextBox.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyPanel.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MySplitter.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyTextBox.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyTreeView.cs\">");
            sw.WriteLine("      <SubType>Component</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"MyUserControl.cs\">");
            sw.WriteLine("      <SubType>UserControl</SubType>");
            sw.WriteLine("    </Compile>");
            sw.WriteLine("    <Compile Include=\"Properties\\AssemblyInfo.cs\" />");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />");
            sw.WriteLine("  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. ");
            sw.WriteLine("       Other similar extension points exist, see Microsoft.Common.targets.");
            sw.WriteLine("  <Target Name=\"BeforeBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  <Target Name=\"AfterBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  -->");
            sw.WriteLine("</Project>");

            sw.Close();
            file.Close();

            AssemblyInfoCoder.Write(path, BaseParams.ControlsNameSpace, BaseParams.ControlsNo);
        }
Пример #6
0
        private static void CreateProject(IList <DbTable> dts)
        {
            string path = BaseParams.External_binPath;

            if (Directory.Exists(path) == true)
            {
                foreach (string fi in Directory.GetFiles(path))
                {
                    File.Delete(fi);
                }
            }
            else
            {
                Directory.CreateDirectory(path);
            }
            if (Directory.Exists(BaseParams.External_binPath) == true)
            {
                // 拷贝对应文件到项目路径下面
                foreach (string dllfile in Directory.GetFiles(Path.Combine(System.Windows.Forms.Application.StartupPath, "External_bin")))
                {
                    if (File.Exists(dllfile) == true)
                    {
                        File.Copy(dllfile, Path.Combine(path, Path.GetFileName(dllfile)));
                    }
                }
            }
            string filepath = Path.Combine(path, BaseParams.External_binNameSpace + ".csproj");

            FileStream   file = new FileStream(filepath, FileMode.Create);
            StreamWriter sw   = new StreamWriter(file, Encoding.UTF8);

            sw.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
            sw.WriteLine("<Project ToolsVersion=\"3.5\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
            sw.WriteLine("  <PropertyGroup>");
            sw.WriteLine("    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
            sw.WriteLine("    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
            sw.WriteLine("    <ProductVersion>9.0.21022</ProductVersion>");
            sw.WriteLine("    <SchemaVersion>2.0</SchemaVersion>");
            sw.WriteLine("    <ProjectGuid>{" + BaseParams.External_binNo + "}</ProjectGuid>");
            sw.WriteLine("    <OutputType>Library</OutputType>");
            sw.WriteLine("    <AppDesignerFolder>Properties</AppDesignerFolder>");
            sw.WriteLine("    <RootNamespace>External_bin</RootNamespace>");
            sw.WriteLine("    <AssemblyName>External_bin</AssemblyName>");
            sw.WriteLine("    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>");
            sw.WriteLine("    <FileAlignment>512</FileAlignment>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">");
            sw.WriteLine("    <DebugSymbols>true</DebugSymbols>");
            sw.WriteLine("    <DebugType>full</DebugType>");
            sw.WriteLine("    <Optimize>false</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\Debug\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>DEBUG;TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">");
            sw.WriteLine("    <DebugType>pdbonly</DebugType>");
            sw.WriteLine("    <Optimize>true</Optimize>");
            sw.WriteLine("    <OutputPath>bin\\Release\\</OutputPath>");
            sw.WriteLine("    <DefineConstants>TRACE</DefineConstants>");
            sw.WriteLine("    <ErrorReport>prompt</ErrorReport>");
            sw.WriteLine("    <WarningLevel>4</WarningLevel>");
            sw.WriteLine("  </PropertyGroup>");
            sw.WriteLine("  <ItemGroup>");
            sw.WriteLine("    <Content Include=\"Castle.Core.dll\" />");
            sw.WriteLine("    <Content Include=\"Castle.DynamicProxy2.dll\" />");
            sw.WriteLine("    <Content Include=\"Iesi.Collections.dll\" />");
            sw.WriteLine("    <Content Include=\"NHibernate.dll\" />");
            sw.WriteLine("    <Content Include=\"log4net.dll\" />");
            sw.WriteLine("  </ItemGroup>");
            sw.WriteLine("  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />");
            sw.WriteLine("  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. ");
            sw.WriteLine("       Other similar extension points exist, see Microsoft.Common.targets.");
            sw.WriteLine("  <Target Name=\"BeforeBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  <Target Name=\"AfterBuild\">");
            sw.WriteLine("  </Target>");
            sw.WriteLine("  -->");
            sw.WriteLine("</Project>");

            sw.Close();
            file.Close();

            AssemblyInfoCoder.Write(path, BaseParams.External_binNameSpace, BaseParams.External_binNo);
        }