Skip to content

Commit 7252ff0

Browse files
authored
Merge pull request #36 from dotnet-campus/t/walterlv/internals-visible-to
[API 破坏性变更] 解决 InternalsVisibleTo 间接造成的大量不同命名空间日志类的情况
2 parents 0723a9e + eed8b17 commit 7252ff0

File tree

85 files changed

+1088
-901
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1088
-901
lines changed

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<Company>dotnet campus(.NET 职业技术学院)</Company>
1818
<Copyright>Copyright 2020-$([System.DateTime]::Now.ToString(`yyyy`)) &#169; dotnet campus, All Rights Reserved.</Copyright>
1919
<RepositoryType>git</RepositoryType>
20-
<RepositoryUrl>https://github.com/dotnet-campus/dotnetCampus.Logger</RepositoryUrl>
21-
<PackageProjectUrl>https://github.com/dotnet-campus/dotnetCampus.Logger</PackageProjectUrl>
20+
<RepositoryUrl>https://github.com/dotnet-campus/DotNetCampus.Logger</RepositoryUrl>
21+
<PackageProjectUrl>https://github.com/dotnet-campus/DotNetCampus.Logger</PackageProjectUrl>
2222
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2323
</PropertyGroup>
2424

@@ -38,6 +38,6 @@
3838
<None Include="..\..\README.md" Link="README.md" Pack="True" PackagePath="\" Visible="False"/>
3939
</ItemGroup>
4040

41-
<Import Project="$(MSBuildThisFileDirectory)src\dotnetCampus.Logger\Properties\Package\buildTransitive\Package.props" />
41+
<Import Project="$(MSBuildThisFileDirectory)src\DotNetCampus.Logger\Properties\Package\buildTransitive\Package.props" />
4242

4343
</Project>

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22

3-
<Import Project="$(MSBuildThisFileDirectory)src\dotnetCampus.Logger\Properties\Package\buildTransitive\Package.targets" />
3+
<Import Project="$(MSBuildThisFileDirectory)src\DotNetCampus.Logger\Properties\Package\buildTransitive\Package.targets" />
44

55
</Project>

dotnetCampus.Logger.sln renamed to DotNetCampus.Logger.sln

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio Version 17
33
VisualStudioVersion = 17.10.35013.160
44
MinimumVisualStudioVersion = 15.0.26124.0
5-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.Logger", "src\dotnetCampus.Logger\dotnetCampus.Logger.csproj", "{F7ED61F4-920C-49EB-8DC1-74B2BE6AF272}"
5+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCampus.Logger", "src\DotNetCampus.Logger\DotNetCampus.Logger.csproj", "{F7ED61F4-920C-49EB-8DC1-74B2BE6AF272}"
66
ProjectSection(ProjectDependencies) = postProject
77
{77F0A6B5-6C8B-4815-8C1E-4F97C24BFB36} = {77F0A6B5-6C8B-4815-8C1E-4F97C24BFB36}
88
EndProjectSection
@@ -27,13 +27,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoggerSample.LoggerIndepend
2727
EndProject
2828
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{36852775-3A76-49CF-98CC-3067CE54A5AD}"
2929
EndProject
30-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.Logger.Tests", "tests\dotnetCampus.Logger.Tests\dotnetCampus.Logger.Tests.csproj", "{D0ACB879-D49B-4ACD-9852-23D0E6D15DDB}"
30+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCampus.Logger.Tests", "tests\DotNetCampus.Logger.Tests\DotNetCampus.Logger.Tests.csproj", "{D0ACB879-D49B-4ACD-9852-23D0E6D15DDB}"
3131
EndProject
32-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.Logger.Analyzer", "src\dotnetCampus.Logger.Analyzer\dotnetCampus.Logger.Analyzer.csproj", "{77F0A6B5-6C8B-4815-8C1E-4F97C24BFB36}"
32+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCampus.Logger.Analyzer", "src\DotNetCampus.Logger.Analyzer\DotNetCampus.Logger.Analyzer.csproj", "{77F0A6B5-6C8B-4815-8C1E-4F97C24BFB36}"
3333
EndProject
3434
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoggerSample.LoggerIndependentProject", "samples\LoggerSample.LoggerIndependentProject\LoggerSample.LoggerIndependentProject.csproj", "{E0DE93BF-AE07-4F92-A3FD-F4D661339BE0}"
3535
EndProject
36-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.Logger.Analyzer.Tests", "tests\dotnetCampus.Logger.Analyzer.Tests\dotnetCampus.Logger.Analyzer.Tests.csproj", "{62456A3B-33BC-475E-BC55-5134CF89127D}"
36+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCampus.Logger.Analyzer.Tests", "tests\DotNetCampus.Logger.Analyzer.Tests\DotNetCampus.Logger.Analyzer.Tests.csproj", "{62456A3B-33BC-475E-BC55-5134CF89127D}"
37+
EndProject
38+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoggerSample.InternalsVisibleToProject", "samples\LoggerSample.InternalsVisibleToProject\LoggerSample.InternalsVisibleToProject.csproj", "{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}"
3739
EndProject
3840
Global
3941
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -141,6 +143,18 @@ Global
141143
{E0DE93BF-AE07-4F92-A3FD-F4D661339BE0}.Release|x64.Build.0 = Release|Any CPU
142144
{E0DE93BF-AE07-4F92-A3FD-F4D661339BE0}.Release|x86.ActiveCfg = Release|Any CPU
143145
{E0DE93BF-AE07-4F92-A3FD-F4D661339BE0}.Release|x86.Build.0 = Release|Any CPU
146+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
147+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
148+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Debug|x64.ActiveCfg = Debug|Any CPU
149+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Debug|x64.Build.0 = Debug|Any CPU
150+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Debug|x86.ActiveCfg = Debug|Any CPU
151+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Debug|x86.Build.0 = Debug|Any CPU
152+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
153+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Release|Any CPU.Build.0 = Release|Any CPU
154+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Release|x64.ActiveCfg = Release|Any CPU
155+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Release|x64.Build.0 = Release|Any CPU
156+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Release|x86.ActiveCfg = Release|Any CPU
157+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A}.Release|x86.Build.0 = Release|Any CPU
144158
EndGlobalSection
145159
GlobalSection(SolutionProperties) = preSolution
146160
HideSolutionNode = FALSE
@@ -152,6 +166,7 @@ Global
152166
{36367E21-BABC-4CC4-891E-CEAF56D66B68} = {34E3F27E-C7E2-45D7-8035-53C304F77E2A}
153167
{D0ACB879-D49B-4ACD-9852-23D0E6D15DDB} = {36852775-3A76-49CF-98CC-3067CE54A5AD}
154168
{E0DE93BF-AE07-4F92-A3FD-F4D661339BE0} = {34E3F27E-C7E2-45D7-8035-53C304F77E2A}
169+
{1FF9CCF6-0BC1-40AE-9158-01F3A2B46F3A} = {34E3F27E-C7E2-45D7-8035-53C304F77E2A}
155170
EndGlobalSection
156171
GlobalSection(ExtensibilityGlobals) = postSolution
157172
SolutionGuid = {D7D96521-5EB7-45B4-B70D-2B3FB69A3082}

README.md

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,19 @@
1-
# dotnetCampus.Logger
1+
# DotNetCampus.Logger
22

3-
| Build | NuGet |
4-
|--|--|
5-
|![](https://github.com/dotnet-campus/dotnetCampus.Logger/workflows/.NET%20Core/badge.svg)|[![](https://img.shields.io/nuget/v/dotnetCampus.Logger.svg)](https://www.nuget.org/packages/dotnetCampus.Logger)|
3+
| Build | NuGet |
4+
|--|-------------------------------------------------------------------------------------------------------------------|
5+
|![](https://github.com/dotnet-campus/DotNetCampus.Logger/workflows/.NET%20Core/badge.svg)| [![](https://img.shields.io/nuget/v/DotNetCampus.Logger.svg)](https://www.nuget.org/packages/DotNetCampus.Logger) |
66

77
## 入门
88

99
### 安装日志库
1010

11-
在你的项目中安装 `dotnetCampus.Logger` 包,你可以通过 NuGet 包管理器或者通过命令行来安装:
11+
在你的项目中安装 `DotNetCampus.Logger` 包,你可以通过 NuGet 包管理器或者通过命令行来安装:
1212

1313
```shell
14-
dotnet add package dotnetCampus.Logger
14+
dotnet add package DotNetCampus.Logger
1515
```
1616

17-
安装完成后,你可以在项目中设置属性来决定如何使用日志库:
18-
19-
```xml
20-
<PropertyGroup>
21-
<!-- 设置以源生成器的方式来使用日志库。 -->
22-
<!-- 以此方式使用日志库,不会使你的项目产生任何额外的依赖,特别适合用于不希望引入额外依赖的库项目。 -->
23-
<DCUseGeneratedLogger>true</DCUseGeneratedLogger>
24-
</PropertyGroup>
25-
```
26-
27-
这个属性可选的值有:
28-
29-
- `onlySource`: 只使用源生成器日志系统,不会引用库;
30-
- `preferSource`: 使用源生成器日志系统,并优先使用它;
31-
- `preferReference`: 使用源生成器日志系统,但优先使用引用的库;
32-
- `onlyReference`: 只使用引用的库,不会生成源代码;
33-
- `true`: 只使用源生成器日志系统,不会引用库(其含义与 `onlySource` 等同);
34-
- `false`: 只使用引用的库,不会生成源代码(其含义与 `onlyReference` 等同)。
35-
36-
在库中,合适的值为 `onlySource` 以不引入依赖;在产品项目中,合适的值为 `onlyReference`,以使用全功能的日志库。
37-
38-
在产品的入口项目中,既可以使用 `onlyReference` 也可以使用 `preferReference`。前者允许你以常规的方式使用日志库,而后者则允许你在初始化日志库之前使用日志库。
39-
4017
### 初始化
4118

4219
在你的初始化代码中添加如下代码,即可完成日志的配置和初始化:
@@ -49,6 +26,8 @@ new LoggerBuilder()
4926
.IntoGlobalStaticLog();
5027
```
5128

29+
### 使用
30+
5231
在使用上述方法完成初始化之后,你就可以在任何地方使用 `Log` 类来输出日志了:
5332

5433
```csharp
@@ -92,13 +71,39 @@ Log.Current.Error("[SourceReference] Log.Current.Error");
9271
Log.Current.Fatal("[SourceReference] Log.Current.Fatal");
9372
```
9473

95-
对于复杂的大型项目,可能会有更加丰富的需求,可以参考下面的示例代码:
74+
### 源生成器
75+
76+
有时候你希望制作一个库,想使用日志系统却不希望产生日志系统的 NuGet 依赖。
77+
78+
这时,你可以通过如下方式来引用此 NuGet 包:
79+
80+
```xml
81+
<ItemGroup>
82+
<PackageReference Include="DotNetCampus.Logger" PrivateAssets="all" ExcludeAssets="compile;runtime" />
83+
</ItemGroup>
84+
```
85+
86+
其中:
87+
88+
1. PrivateAssets="all" 用于表明生成的 NuGet 包将不引入 DotNetCampus.Logger 包依赖;
89+
2. ExcludeAssets 中 compile 用于不引入编译时的依赖(此时以下源才会自动解除注释);
90+
3. ExcludeAssets 中 runtime 用于不将依赖复制到目标目录(因为运行时已经不需要它们了)。
91+
92+
这时,源生成器会在你的项目中生成一套日志系统的内部代码。你可以在库里各处正常使用日志系统的各种类和方法。
93+
94+
特别的,无论你的项目目前是以什么方式使用的此日志系统库,你都可以在源生成器中找到生成的代码。只是对于不需要生成代码的场景下,里面生成的代码是注释掉的;你可以通过注释调查没有生成源代码的原因,以及辅助查阅本文档的更详细细节。
95+
96+
### 日志桥接
97+
98+
如果你的应用程序依赖了一个或多个包含上述源生成器日志系统的库,可以使用桥接功能将它们的日志接到当前应用程序的日志系统中。
99+
100+
以下是一个复杂大型项目的初始化示例代码:
96101

97102
```csharp
98-
using dotnetCampus.Logging.Attributes;
99-
using dotnetCampus.Logging.Writers;
103+
using DotNetCampus.Logging.Attributes;
104+
using DotNetCampus.Logging.Writers;
100105

101-
namespace dotnetCampus.Demo.Sample;
106+
namespace DotNetCampus.Demo.Sample;
102107

103108
internal static class LoggerStartup
104109
{
@@ -123,12 +128,14 @@ internal static class LoggerStartup
123128
}
124129
}
125130

126-
[ImportLoggerBridge<global::dotnetCampus.Demo1.Logging.ILoggerBridge>]
127-
[ImportLoggerBridge<global::dotnetCampus.Demo2.Logging.ILoggerBridge>]
131+
[ImportLoggerBridge<global::DotNetCampus.Demo1.Logging.ILoggerBridge>]
132+
[ImportLoggerBridge<global::DotNetCampus.Demo2.Logging.ILoggerBridge>]
128133
internal partial class LoggerBridgeLinker;
129134
```
130135

131-
当然,在你的应用程序中,日志级别通常不是写死在代码里的,往往需要从命令行参数、环境变量、配置文件等位置读取。那么可通过 `LogLevelParser.Parse` 方法将字符串解析为日志级别,相比于普通枚举的解析,此方法额外支持日志级别的常见别名。支持的别名请参见 [LogLevelParser.cs](https://github.com/dotnet-campus/dotnetCampus.Logger/blob/main/src/dotnetCampus.Logger/LogLevelParser.cs) 的注释。
136+
桥接类的命名空间由桥接类所在项目的 `$(RootNamespace)` 决定,你也可以通过指定 `$(DCGeneratedLoggerNamespace)` 单独指定桥接类的命名空间而不影响项目原本的命名空间。
137+
138+
另外,在你的应用程序中,日志级别通常不是写死在代码里的,往往需要从命令行参数、环境变量、配置文件等位置读取。那么可通过 `LogLevelParser.Parse` 方法将字符串解析为日志级别,相比于普通枚举的解析,此方法额外支持日志级别的常见别名。支持的别名请参见 [LogLevelParser.cs](https://github.com/dotnet-campus/DotNetCampus.Logger/blob/main/src/DotNetCampus.Logger/LogLevelParser.cs) 的注释。
132139

133140
### 日志过滤规则
134141

build/Version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>9999.0.0-localbuild</Version>
3+
<Version>1.3.0-alpha01</Version>
44
</PropertyGroup>
55
</Project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<NoWarn>$(NoWarn);CS0436</NoWarn>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<ProjectReference Include="..\..\src\DotNetCampus.Logger.Analyzer\DotNetCampus.Logger.Analyzer.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
10+
<ProjectReference Include="..\LoggerSample.LoggerIndependentLibrary\LoggerSample.LoggerIndependentLibrary.csproj" />
11+
<ProjectReference Include="..\LoggerSample.LoggerIndependentProject\LoggerSample.LoggerIndependentProject.csproj" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using DotNetCampus.Logging;
2+
3+
namespace LoggerSample.InternalsVisibleToProject;
4+
5+
public class SourceReferenceTarget
6+
{
7+
public static void CollectLogs()
8+
{
9+
Log.TraceLogger.Trace("[SourceReference] Log.Trace.Trace");
10+
Log.TraceLogger.Debug("[SourceReference] Log.Trace.Debug");
11+
Log.TraceLogger.Info("[SourceReference] Log.Trace.Info");
12+
Log.TraceLogger.Warn("[SourceReference] Log.Trace.Warn");
13+
Log.TraceLogger.Error("[SourceReference] Log.Trace.Error");
14+
Log.TraceLogger.Fatal("[SourceReference] Log.Trace.Fatal");
15+
16+
Log.DebugLogger.Trace("[SourceReference] Log.Debug.Trace");
17+
Log.DebugLogger.Debug("[SourceReference] Log.Debug.Debug");
18+
Log.DebugLogger.Info("[SourceReference] Log.Debug.Info");
19+
Log.DebugLogger.Warn("[SourceReference] Log.Debug.Warn");
20+
Log.DebugLogger.Error("[SourceReference] Log.Debug.Error");
21+
Log.DebugLogger.Fatal("[SourceReference] Log.Debug.Fatal");
22+
23+
Log.Trace("[SourceReference] Log.Trace");
24+
Log.Debug("[SourceReference] Log.Debug");
25+
Log.Info("[SourceReference] Log.Info");
26+
Log.Warn("[SourceReference] Log.Warn");
27+
Log.Error("[SourceReference] Log.Error");
28+
Log.Fatal("[SourceReference] Log.Fatal");
29+
30+
Log.Current.Trace("[SourceReference] Log.Current.Trace");
31+
Log.Current.Debug("[SourceReference] Log.Current.Debug");
32+
Log.Current.Info("[SourceReference] Log.Current.Info");
33+
Log.Current.Warn("[SourceReference] Log.Current.Warn");
34+
Log.Current.Error("[SourceReference] Log.Current.Error");
35+
Log.Current.Fatal("[SourceReference] Log.Current.Fatal");
36+
}
37+
}

samples/LoggerSample.LoggerDependentLibrary/DllReferenceTarget.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using dotnetCampus.Logging;
1+
using DotNetCampus.Logging;
22

33
namespace LoggerSample.LoggerDependentLibrary;
44

samples/LoggerSample.LoggerDependentLibrary/LoggerSample.LoggerDependentLibrary.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<ProjectReference Include="..\..\src\dotnetCampus.Logger\dotnetCampus.Logger.csproj" />
9+
<ProjectReference Include="..\..\src\DotNetCampus.Logger\DotNetCampus.Logger.csproj" />
1010
</ItemGroup>
1111

1212
</Project>

samples/LoggerSample.LoggerIndependentLibrary/LoggerSample.LoggerIndependentLibrary.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
6-
<DCUseGeneratedLogger>true</DCUseGeneratedLogger>
76
</PropertyGroup>
87

98
<ItemGroup>
10-
<ProjectReference Include="..\..\src\dotnetCampus.Logger.Analyzer\dotnetCampus.Logger.Analyzer.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
9+
<ProjectReference Include="..\..\src\DotNetCampus.Logger.Analyzer\DotNetCampus.Logger.Analyzer.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<InternalsVisibleTo Include="LoggerSample.InternalsVisibleToProject" />
1114
</ItemGroup>
1215

1316
</Project>

samples/LoggerSample.LoggerIndependentLibrary/SourceReferenceTarget.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using LoggerSample.LoggerIndependentLibrary.Logging;
1+
using DotNetCampus.Logging;
22

33
namespace LoggerSample.LoggerIndependentLibrary;
44

samples/LoggerSample.LoggerIndependentProject/LoggerSample.LoggerIndependentProject.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
6-
<DCUseGeneratedLogger>true</DCUseGeneratedLogger>
76
</PropertyGroup>
87

98
<ItemGroup>
10-
<ProjectReference Include="..\..\src\dotnetCampus.Logger.Analyzer\dotnetCampus.Logger.Analyzer.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
9+
<ProjectReference Include="..\..\src\DotNetCampus.Logger.Analyzer\DotNetCampus.Logger.Analyzer.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<InternalsVisibleTo Include="LoggerSample.InternalsVisibleToProject" />
1114
</ItemGroup>
1215

1316
</Project>

samples/LoggerSample.LoggerIndependentProject/SourceReferenceTarget.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using LoggerSample.LoggerIndependentProject.Logging;
1+
using DotNetCampus.Logging;
22

33
namespace LoggerSample.LoggerIndependentProject;
44

samples/LoggerSample.MainApp/LoggerSample.MainApp.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net8.0</TargetFramework>
6-
<DCUseGeneratedLogger>preferReference</DCUseGeneratedLogger>
76
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
87
</PropertyGroup>
98

109
<ItemGroup>
11-
<ProjectReference Include="..\..\src\dotnetCampus.Logger.Analyzer\dotnetCampus.Logger.Analyzer.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
12-
<ProjectReference Include="..\..\src\dotnetCampus.Logger\dotnetCampus.Logger.csproj" OutputItemType="xxxxxxxxxx" />
10+
<ProjectReference Include="..\..\src\DotNetCampus.Logger.Analyzer\DotNetCampus.Logger.Analyzer.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
11+
<ProjectReference Include="..\..\src\DotNetCampus.Logger\DotNetCampus.Logger.csproj" />
12+
<ProjectReference Include="..\LoggerSample.InternalsVisibleToProject\LoggerSample.InternalsVisibleToProject.csproj" />
1313
<ProjectReference Include="..\LoggerSample.LoggerDependentLibrary\LoggerSample.LoggerDependentLibrary.csproj" />
1414
<ProjectReference Include="..\LoggerSample.LoggerIndependentLibrary\LoggerSample.LoggerIndependentLibrary.csproj" />
1515
<ProjectReference Include="..\LoggerSample.LoggerIndependentProject\LoggerSample.LoggerIndependentProject.csproj" />

0 commit comments

Comments
 (0)