Skip to content

Commit

Permalink
nlog.winform组件有bug 改成自己修改过后的
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzd committed Sep 27, 2022
1 parent 51b85ad commit 721b965
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 114 deletions.
17 changes: 8 additions & 9 deletions AntDeployWinform/AntDeployWinform.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\AntDeploy\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\DLL\NLog.dll</HintPath>
</Reference>
<Reference Include="NLog.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\DLL\NLog.Windows.Forms.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down Expand Up @@ -253,9 +261,6 @@
<EmbeddedResource Include="Winform\SelectProject.zh-Hans.resx">
<DependentUpon>SelectProject.cs</DependentUpon>
</EmbeddedResource>
<None Include="nlog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down Expand Up @@ -283,12 +288,6 @@
<PackageReference Include="LibGit2Sharp">
<Version>0.26.2</Version>
</PackageReference>
<PackageReference Include="NLog">
<Version>5.0.1</Version>
</PackageReference>
<PackageReference Include="NLog.Windows.Forms">
<Version>4.6.0</Version>
</PackageReference>
<PackageReference Include="SSH.NET">
<Version>2020.0.2</Version>
</PackageReference>
Expand Down
7 changes: 3 additions & 4 deletions AntDeployWinform/Winform/Deploy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,9 @@ private void Init(string projectPath, ProjectParam project = null, bool isFirst
private void NlogConfig()
{

#region Nlog
#region Nlog 修改过的dll 不能升级,否则会导致在某些windows系统上出现中文乱码的问题

/*

var config = new LoggingConfiguration();
var richTarget = new RichTextBoxTarget
{
Expand Down Expand Up @@ -629,8 +629,7 @@ private void NlogConfig()
config.LoggingRules.Add(rule5);

LogManager.Configuration = config;
*/
LogManager.Setup().SetupExtensions(ext => ext.RegisterAssembly(typeof(RichTextBoxTarget).Assembly));

nlog_iis = NLog.LogManager.GetLogger("rich_iis_log");
nlog_windowservice = NLog.LogManager.GetLogger("rich_windowservice_log");
nlog_linux = NLog.LogManager.GetLogger("rich_linuxservice_log");
Expand Down
101 changes: 0 additions & 101 deletions AntDeployWinform/nlog.config

This file was deleted.

0 comments on commit 721b965

Please sign in to comment.