我和Serilog失踪了什么? [英] What namspace and I missing for Serilog?

查看:66
本文介绍了我和Serilog失踪了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Serilog缺少什么namspace?


我可以在我的C#代码中使用LoggerConfiguration()和各种Serilog Sink但我的编译器抱怨规范我使用".WriteTo.File"。我很困惑因为我能够在另一个演示
解决方案中使用此规范。我想知道是否需要添加某种程序集作为参考。我已经运行了"Install-Package Serilog.Sinks.File"。来自"包管理器控制台"但这似乎没有任何影响或改变。<​​/ p>


我缺少什么指令或我需要什么汇编参考?



我试图通过在线文档解决这个问题,但我找不到结果。

解决方案

Serilog缺少什么namspace?


我可以在C#代码中使用LoggerConfiguration()和各种Serilog Sink但我的编译器抱怨我使用".WriteTo.File"的规范。我很困惑因为我能够在另一个演示
解决方案中使用此规范。我想知道是否需要添加某种程序集作为参考。我已经运行了"Install-Package Serilog.Sinks.File"。来自"包管理器控制台"但这似乎没有任何影响或改变。<​​/ p>


我缺少什么指令或我需要什么汇编参考?



我试图通过在线文档解决这个问题,但我找不到结果。



What namspace and I missing for Serilog?

I am able to use LoggerConfiguration() in my C# code with various Serilog Sinks but my compiler is complaining about the specification of my use of ".WriteTo.File". I am confused because I have ben able to use this specification in another demo solution. I wonder if there is some sort of Assembly I need to add as a reference. I have run "Install-Package Serilog.Sinks.File" from the "Package Manager Console" but that did not seem to have any effect or change.

What directive am I missing or what assembly reference do I need?

I tried to figure this out via online documentation but I can not find the result.

解决方案

What namspace and I missing for Serilog?

I am able to use LoggerConfiguration() in my C# code with various Serilog Sinks but my compiler is complaining about the specification of my use of ".WriteTo.File". I am confused because I have ben able to use this specification in another demo solution. I wonder if there is some sort of Assembly I need to add as a reference. I have run "Install-Package Serilog.Sinks.File" from the "Package Manager Console" but that did not seem to have any effect or change.

What directive am I missing or what assembly reference do I need?

I tried to figure this out via online documentation but I can not find the result.


这篇关于我和Serilog失踪了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆