add windows support
This commit is contained in:
353
setup/Program.cs
Normal file
353
setup/Program.cs
Normal file
@ -0,0 +1,353 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
|
||||
internal static class Win32API
|
||||
{
|
||||
[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
internal static extern bool IsWow64Process([In] IntPtr process, [Out] out bool wow64Process);
|
||||
}
|
||||
|
||||
namespace setup
|
||||
{
|
||||
class Program
|
||||
{
|
||||
public static bool IsAdministrator()
|
||||
{
|
||||
WindowsIdentity current = WindowsIdentity.GetCurrent();
|
||||
WindowsPrincipal windowsPrincipal = new WindowsPrincipal(current);
|
||||
//WindowsBuiltInRole可以枚举出很多权限,例如系统用户、User、Guest等等
|
||||
return windowsPrincipal.IsInRole(WindowsBuiltInRole.Administrator);
|
||||
}
|
||||
|
||||
public static bool IsWin64(Process process)
|
||||
{
|
||||
IntPtr processHandle;
|
||||
bool retVal;
|
||||
|
||||
try
|
||||
{
|
||||
processHandle = Process.GetProcessById(process.Id).Handle;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return Win32API.IsWow64Process(processHandle, out retVal) && retVal;
|
||||
}
|
||||
|
||||
public static string GetDownloadURL()
|
||||
{
|
||||
Process cur = Process.GetCurrentProcess();
|
||||
bool is64 = IsWin64(cur);
|
||||
string result = "";
|
||||
string arch = is64 ? "amd64" : "386";
|
||||
string url = "https://server-0.sercretcore.cn/api/download?arch=" + arch + "&platform=windows";
|
||||
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
|
||||
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
|
||||
Stream stream = resp.GetResponseStream();
|
||||
try
|
||||
{
|
||||
//获取内容
|
||||
using (StreamReader reader = new StreamReader(stream))
|
||||
{
|
||||
result = reader.ReadToEnd();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
stream.Close();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void Mkdir(string subPath)
|
||||
{
|
||||
if (!Directory.Exists(subPath))
|
||||
{
|
||||
//创建pic文件夹
|
||||
Directory.CreateDirectory(subPath);
|
||||
}
|
||||
}
|
||||
|
||||
static string runCmd(string sr)
|
||||
{
|
||||
Process pro = null;
|
||||
string ll = string.Empty;
|
||||
try
|
||||
{
|
||||
pro = new Process();
|
||||
pro.StartInfo.FileName = "cmd.exe"; //cmd
|
||||
pro.StartInfo.UseShellExecute = false; //不显示shell
|
||||
pro.StartInfo.CreateNoWindow = true; //不创建窗口
|
||||
pro.StartInfo.RedirectStandardInput = true; //打开流输入
|
||||
pro.StartInfo.RedirectStandardOutput = true; //打开流输出
|
||||
pro.StartInfo.RedirectStandardError = true; //打开错误流
|
||||
pro.Start();//执行
|
||||
pro.StandardInput.WriteLine(sr);
|
||||
pro.StandardInput.WriteLine("exit"); //&exit运行完立即退出
|
||||
pro.StandardInput.AutoFlush = true; //清缓存
|
||||
|
||||
ll = pro.StandardOutput.ReadToEnd() + pro.StandardError.ReadToEnd(); //读取输出
|
||||
|
||||
pro.WaitForExit(); //等待程序执行完退出进程
|
||||
pro.Close();//结束
|
||||
return ll;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Exception Occurred:{ 0},{ 1}", ex.Message, ex.StackTrace.ToString());
|
||||
return ex.Message.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行外部命令
|
||||
/// </summary>
|
||||
/// <param name="argument">命令参数</param>
|
||||
/// <param name="application">命令程序路径</param>
|
||||
/// <returns>执行结果</returns>
|
||||
public static string ExecuteOutCmd(string applocaltion, string argument)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var process = new Process())
|
||||
{
|
||||
process.StartInfo.Arguments = argument;
|
||||
process.StartInfo.FileName = applocaltion;
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
process.StartInfo.RedirectStandardInput = true;
|
||||
process.StartInfo.RedirectStandardOutput = true;
|
||||
process.StartInfo.RedirectStandardError = true;
|
||||
process.StartInfo.CreateNoWindow = true;
|
||||
|
||||
process.Start();
|
||||
process.StandardInput.AutoFlush = true;
|
||||
process.StandardInput.WriteLine("exit");
|
||||
|
||||
//获取cmd窗口的输出信息
|
||||
string output = process.StandardOutput.ReadToEnd() + process.StandardError.ReadToEnd();
|
||||
|
||||
process.WaitForExit();
|
||||
process.Close();
|
||||
|
||||
return output;
|
||||
}
|
||||
} catch (Exception ex)
|
||||
{
|
||||
return ex.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载文件
|
||||
/// </summary>
|
||||
/// <param name="url">下载地址</param>
|
||||
/// <param name="filePath">保存路径</param>
|
||||
/// <returns></returns>
|
||||
public static bool DownLoadOneFile(string url, string filePath)
|
||||
{
|
||||
FileStream fstream = new FileStream(filePath, FileMode.Create, FileAccess.Write);
|
||||
WebRequest wRequest = WebRequest.Create(url);
|
||||
try
|
||||
{
|
||||
WebResponse wResponse = wRequest.GetResponse();
|
||||
int contentLength = (int)wResponse.ContentLength;
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
|
||||
///备注:Properties.Settings.Default.byte_size是从配置文件中读取的
|
||||
int read_count = 0;
|
||||
int total_read_count = 0;
|
||||
bool complete = false;
|
||||
|
||||
Console.WriteLine("Downloading....");
|
||||
|
||||
while (!complete)
|
||||
{
|
||||
read_count = wResponse.GetResponseStream().Read(buffer, 0, buffer.Length);
|
||||
if (read_count > 0)
|
||||
{
|
||||
fstream.Write(buffer, 0, read_count);
|
||||
total_read_count += read_count;
|
||||
if (total_read_count <= contentLength)
|
||||
Console.Write(".");
|
||||
}
|
||||
else
|
||||
{
|
||||
complete = true;
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("Download finished, installing...");
|
||||
|
||||
}
|
||||
}
|
||||
fstream.Flush();
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
fstream.Close();
|
||||
wRequest = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///直接删除指定目录下的所有文件及文件夹(保留目录)
|
||||
/// </summary>
|
||||
/// <param name="strPath">文件夹路径</param>
|
||||
/// <returns>执行结果</returns>
|
||||
public static void DeleteDir(string file)
|
||||
{
|
||||
try
|
||||
{
|
||||
//去除文件夹和子文件的只读属性
|
||||
//去除文件夹的只读属性
|
||||
DirectoryInfo fileInfo = new DirectoryInfo(file);
|
||||
fileInfo.Attributes = FileAttributes.Normal & FileAttributes.Directory;
|
||||
|
||||
//去除文件的只读属性
|
||||
File.SetAttributes(file, FileAttributes.Normal);
|
||||
|
||||
//判断文件夹是否还存在
|
||||
if (Directory.Exists(file))
|
||||
{
|
||||
|
||||
foreach (string f in Directory.GetFileSystemEntries(file))
|
||||
{
|
||||
|
||||
if (File.Exists(f))
|
||||
{
|
||||
//如果有子文件删除文件
|
||||
File.Delete(f);
|
||||
Console.WriteLine(f);
|
||||
}
|
||||
else
|
||||
{
|
||||
//循环递归删除子文件夹
|
||||
DeleteDir(f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//删除空文件夹
|
||||
|
||||
Directory.Delete(file);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex) // 异常处理
|
||||
{
|
||||
Console.WriteLine(ex.Message.ToString());// 异常信息
|
||||
}
|
||||
}
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (IsAdministrator())
|
||||
{
|
||||
Console.Write(@"
|
||||
DC-Agent
|
||||
|
||||
https://github.com/yi-ge/dc-agent
|
||||
------------------------------------------------------
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Yige
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the " + "\"Software\")" + @", to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED " + "\"AS IS\"" + @", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("What do you want to do?");
|
||||
Console.WriteLine("1) Install (I accept the MIT License.)");
|
||||
Console.WriteLine("2) Uninstall");
|
||||
Console.WriteLine("3) Exit");
|
||||
Console.Write("#?");
|
||||
string cmd = Console.ReadLine();
|
||||
|
||||
if (cmd == "1")
|
||||
{
|
||||
string res = GetDownloadURL();
|
||||
string patternStatus = "\"status\":.";
|
||||
string patternDownloadURL = "\"downloadURL\":\".*?[^\\\\]\",";
|
||||
string status = Regex.Matches(res, patternStatus)[0].Value.Replace("\"status\":", "");
|
||||
|
||||
if (status != "1")
|
||||
{
|
||||
Console.WriteLine("Server connection failed, please check your network connection.");
|
||||
Console.ReadLine();
|
||||
Environment.Exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
string downloadURL = Regex.Matches(res, patternDownloadURL)[0].Value.Replace("\"downloadURL\":\"", "").Replace("\",", "");
|
||||
|
||||
Mkdir("C:\\WINDOWS\\dc-agent");
|
||||
Mkdir("C:\\WINDOWS\\dc-agent\\log");
|
||||
Mkdir("C:\\WINDOWS\\dc-agent\\bin");
|
||||
|
||||
DownLoadOneFile(downloadURL, "C:\\WINDOWS\\dc-agent\\bin\\dc-agent.exe");
|
||||
|
||||
Console.WriteLine(ExecuteOutCmd("C:\\WINDOWS\\dc-agent\\bin\\dc-agent.exe", "install"));
|
||||
Console.WriteLine(ExecuteOutCmd("C:\\WINDOWS\\dc-agent\\bin\\dc-agent.exe", "start"));
|
||||
|
||||
Console.WriteLine("Install success!");
|
||||
Console.ReadLine();
|
||||
}
|
||||
else if (cmd == "2")
|
||||
{
|
||||
Console.WriteLine(ExecuteOutCmd("C:\\WINDOWS\\dc-agent\\bin\\dc-agent.exe", "stop"));
|
||||
Console.WriteLine(ExecuteOutCmd("C:\\WINDOWS\\dc-agent\\bin\\dc-agent.exe", "remove"));
|
||||
|
||||
// DeleteDir("C:\\WINDOWS\\dc-agent\\");
|
||||
Thread.Sleep(1500);
|
||||
|
||||
runCmd("rd /s /q C:\\WINDOWS\\dc-agent\\");
|
||||
|
||||
Console.WriteLine("Uninstall success!");
|
||||
Console.ReadLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Console.WriteLine(ExecuteOutCmd("C:\\WINDOWS\\dc-agent\\bin\\dc-agent.exe", "start"));
|
||||
// Console.ReadLine();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("You need to be administrator to perform this command.");
|
||||
Console.WriteLine("请以管理员权限运行此程序");
|
||||
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
36
setup/Properties/AssemblyInfo.cs
Normal file
36
setup/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("setup")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("setup")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("839f4f55-2904-4a2b-bdbd-d515958f816e")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
69
setup/Properties/app.manifest
Normal file
69
setup/Properties/app.manifest
Normal file
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- UAC 清单选项
|
||||
如果想要更改 Windows 用户帐户控制级别,请使用
|
||||
以下节点之一替换 requestedExecutionLevel 节点。n
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
|
||||
如果你的应用程序需要此虚拟化来实现向后兼容性,则删除此
|
||||
元素。
|
||||
-->
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
<applicationRequestMinimum>
|
||||
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||
<PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" Unrestricted="true" />
|
||||
</applicationRequestMinimum>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
|
||||
Windows 版本的列表。取消评论适当的元素,
|
||||
Windows 将自动选择最兼容的环境。 -->
|
||||
<!-- Windows Vista -->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||
<!-- Windows 7 -->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||
<!-- Windows 8 -->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||
<!-- Windows 8.1 -->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
<!-- Windows 10 -->
|
||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||
</application>
|
||||
</compatibility>
|
||||
<!-- 指示该应用程序可以感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
|
||||
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
|
||||
选择加入。选择加入此设置的 Windows 窗体应用程序(目标设定为 .NET Framework 4.6 )还应
|
||||
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。-->
|
||||
<!--
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
-->
|
||||
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
|
||||
<!--
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
-->
|
||||
</assembly>
|
80
setup/setup.csproj
Normal file
80
setup/setup.csproj
Normal file
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{839F4F55-2904-4A2B-BDBD-D515958F816E}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>setup</RootNamespace>
|
||||
<AssemblyName>setup</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>false</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Properties\app.manifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
Reference in New Issue
Block a user