windows service: added folder publish. refactoring done.

This commit is contained in:
Shreyas Zare 2021-03-13 13:29:59 +05:30
parent 3b33d175f3
commit c346e553e8
6 changed files with 52 additions and 32 deletions

View File

@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<RootNamespace>DnsServerWindowsService</RootNamespace>
<AssemblyName>DnsService</AssemblyName>
<ApplicationIcon>logo2.ico</ApplicationIcon>
<Version>6.0</Version>
<Authors>Shreyas Zare</Authors>
<Company>Technitium</Company>
<Product>Technitium DNS Server</Product>
<Description>.NET 5</Description>
<PackageProjectUrl>https://technitium.com/dns/</PackageProjectUrl>
<RepositoryUrl>https://github.com/TechnitiumSoftware/DnsServer</RepositoryUrl>
<PackageId>DnsServerWindowsService</PackageId>
</PropertyGroup>
<ItemGroup>
<Reference Include="TechnitiumLibrary.Net.Firewall">
<HintPath>..\..\TechnitiumLibrary\bin\TechnitiumLibrary.Net.Firewall.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="5.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DnsServerCore\DnsServerCore.csproj" />
</ItemGroup>
</Project>

View File

@ -23,7 +23,7 @@ using System;
using System.Threading;
using System.Threading.Tasks;
namespace DnsService
namespace DnsServerWindowsService
{
public class DnsServiceWorker : BackgroundService
{

View File

@ -23,7 +23,7 @@ using System;
using System.Reflection;
using TechnitiumLibrary.Net.Firewall;
namespace DnsService
namespace DnsServerWindowsService
{
static class Program
{

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>..\DnsServerWindowsSetup\publish</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net5.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -1,30 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<RootNamespace>DnsService</RootNamespace>
<AssemblyName>DnsService</AssemblyName>
<ApplicationIcon>logo2.ico</ApplicationIcon>
<Version>2.6.0.0</Version>
</PropertyGroup>
<ItemGroup>
<Reference Include="TechnitiumLibrary.Net.Firewall">
<HintPath>..\..\TechnitiumLibrary\bin\TechnitiumLibrary.Net.Firewall.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DnsServerCore\DnsServerCore.csproj">
<Project>{4494b79b-588c-41f2-95ad-0897123af154}</Project>
<Name>DnsServerCore</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" />
</ItemGroup>
</Project>