Skip to content

Instantly share code, notes, and snippets.

@ikkentim
Last active June 23, 2022 09:00
Show Gist options
  • Select an option

  • Save ikkentim/a582f46d80baac0f8e9c17e2b32ca096 to your computer and use it in GitHub Desktop.

Select an option

Save ikkentim/a582f46d80baac0f8e9c17e2b32ca096 to your computer and use it in GitHub Desktop.

Revisions

  1. ikkentim revised this gist Jun 23, 2022. 2 changed files with 9 additions and 1 deletion.
    6 changes: 6 additions & 0 deletions App.config
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
    </startup>
    </configuration>
    4 changes: 3 additions & 1 deletion ConsoleApp1.csproj
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,6 @@
    </ItemGroup>
    <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    </ItemGroup>
    <ItemGroup>
    <None Include="App.config" />
    @@ -63,5 +62,8 @@
    <Version>5.0.0</Version>
    </PackageReference>
    </ItemGroup>
    <ItemGroup>
    <Folder Include="Properties\" />
    </ItemGroup>
    <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    </Project>
  2. ikkentim created this gist Jun 23, 2022.
    67 changes: 67 additions & 0 deletions ConsoleApp1.csproj
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,67 @@
    <?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>{7AFF019E-1FEB-4F8A-9CF0-201D6EE5DE3C}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>ConsoleApp1</RootNamespace>
    <AssemblyName>ConsoleApp1</AssemblyName>
    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <Deterministic>true</Deterministic>
    </PropertyGroup>
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    </PropertyGroup>
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    </PropertyGroup>
    <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.Xml" />
    </ItemGroup>
    <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    </ItemGroup>
    <ItemGroup>
    <None Include="App.config" />
    </ItemGroup>
    <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.Hosting">
    <Version>6.0.1</Version>
    </PackageReference>
    <PackageReference Include="NLog">
    <Version>5.0.1</Version>
    </PackageReference>
    <PackageReference Include="NLog.Extensions.Hosting">
    <Version>5.0.0</Version>
    </PackageReference>
    <PackageReference Include="NLog.Extensions.Logging">
    <Version>5.0.0</Version>
    </PackageReference>
    </ItemGroup>
    <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    </Project>
    16 changes: 16 additions & 0 deletions Program.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    using Microsoft.Extensions.Hosting;
    using NLog.Extensions.Hosting;

    namespace ConsoleApp1
    {
    internal class Program
    {
    public static void Main(string[] args)
    {
    Host.CreateDefaultBuilder(args)
    .UseNLog()
    .Build()
    .Run();
    }
    }
    }