そうではないようで、将来のプロジェクトで使用する予定です (ロギング、例外など)。まだサポートされていますか? 以前のように、このツールに関する活動はあまり見られません。
私たちはすでに NewRelic を持っているので、NewRelic がすでにロギング/例外処理を実行できるかどうかを知ることも役に立ちます。たとえば、カスタム ログまたは例外を作成して、新しい Relic ダッシュボードで表示できますか?
そうではないようで、将来のプロジェクトで使用する予定です (ロギング、例外など)。まだサポートされていますか? 以前のように、このツールに関する活動はあまり見られません。
私たちはすでに NewRelic を持っているので、NewRelic がすでにロギング/例外処理を実行できるかどうかを知ることも役に立ちます。たとえば、カスタム ログまたは例外を作成して、新しい Relic ダッシュボードで表示できますか?
します。Nugetを介してEnterprise Library 6をプロジェクトに追加でき ます。これがサンプル アプリケーションです。
using System;
using System.Diagnostics;
using Microsoft.Practices.EnterpriseLibrary.Logging;
using Microsoft.Practices.EnterpriseLibrary.Logging.Formatters;
using Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners;
namespace Practice.Logging
{
internal class Program
{
public static void Main(string[] args)
{
LoggingConfiguration loggingConfiguration = BuildProgrammaticConfig();
var defaultWriter = new LogWriter(loggingConfiguration);
// Check if logging is enabled before creating log entries.
if (defaultWriter.IsLoggingEnabled())
{
defaultWriter.Write("Log entry created using the simplest overload.");
defaultWriter.Write("Log entry with a single category.", "General");
defaultWriter.Write("Log entry with a category, priority, and event ID.", "General", 6, 9001);
defaultWriter.Write("Log entry with a category, priority, event ID, " + "and severity.", "General", 5, 9002, TraceEventType.Warning);
defaultWriter.Write("Log entry with a category, priority, event ID, " + "severity, and title.", "General", 8, 9003, TraceEventType.Warning, "Logging Block Examples");
}
else
{
Console.WriteLine("Logging is disabled in the configuration.");
}
}
private static LoggingConfiguration BuildProgrammaticConfig()
{
// Formatter
var formatter = new TextFormatter();
// Trace Listeners
var eventLog = new EventLog("Application", ".", "StackOverflow #24309323");
var eventLogTraceListener = new FormattedEventLogTraceListener(eventLog, formatter);
// Build Configuration
var config = new LoggingConfiguration();
config.AddLogSource("General", SourceLevels.All, true)
.AddTraceListener(eventLogTraceListener);
config.IsTracingEnabled = true;
return config;
}
}
}
詳細については、 Logging Application Blockを参照してください。
拡張機能を Visual Studio 2013 にインストールするには、次の回避策の手順に従ってください。
VSIX ファイルは、Open Packaging Convention を使用する zip ファイルです。.VSIX 拡張子の名前を .ZIP に変更し、任意の zip ブラウザー (Windows ファイル エクスプローラーを含む) を使用してその内容を参照できます。
<SupportedProducts>
<VisualStudio Version="11.0">
<Edition>Ultimate</Edition>
<Edition>Premium</Edition>
<Edition>Pro</Edition>
</VisualStudio>
</SupportedProducts>
<SupportedProducts>
<VisualStudio Version="11.0">
<Edition>Ultimate</Edition>
<Edition>Premium</Edition>
<Edition>Pro</Edition>
</VisualStudio>
<VisualStudio Version="12.0"> <!-- VS2013 -->
<Edition>Ultimate</Edition>
<Edition>Premium</Edition>
<Edition>Pro</Edition>
</VisualStudio>
<VisualStudio Version="14.0"> <!-- VS2015 -->
<Edition>Ultimate</Edition>
<Edition>Premium</Edition>
<Edition>Pro</Edition>
</VisualStudio>
</SupportedProducts>
ZIP
フォルダーをファイルとして再度圧縮するVSIX
技術的には @cilerler が提案するものと同じですが、すぐにダウンロードして使用できるソリューションです。
Visual Studio 2013: Microsoft.Practices.EnterpriseLibrary.ConfigConsole.V6.VS2013.vsix (ソース) Visual Studio 2015: Microsoft.Practices.EnterpriseLibrary.ConfigConsole.V6.VS2015.vsix (ソース)
asp.net、コンソール、または Windows アプリの bin フォルダーに次の dll が必要です。
•Microsoft.Practices.EnterpriseLibrary.Common.dll
•Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime.dll
•Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapterV5.dll
•Microsoft.Practices.EnterpriseLibrary.Configuration.EnvironmentalOverrides.dll
実際には Microsoft.Practices.Unity.dll はオプションであり、entlib 6 で見られるものです
私が持っているプロジェクトは Enterprise Library 6.0 を使用していますが、VSIX は EL 5 をターゲットにしているようです。VSIX を Visual Studio 2013 および 2015 で正しく動作させることはできませんでしたが、Enterprise Library 6 構成ツールをMicrosoft が提供するバイナリ。ここにダウンロードへのリンクがあります。
EnterpriseLibrary6-binaries.exe を選択します。ファイルをフォルダに解凍してインストールします。EntLibConfig.exe という名前の 64 ビット エンタープライズ ライブラリ構成ツール。EntLibConfig-32.exe という名前の 32 ビット バージョンもあります。
はい、そうです。このリンクは、必要なすべての詳細を提供します https://msdn.microsoft.com/en-us/library/dn169621.aspx
また、詳細な実装については、以下のサイトを参照できます。vsix バージョンまたはバイナリ ( http://www.microsoft.com/en-us/download/details.aspx?id=38789 ) をインストールして構成を作成できます。vsix が機能しない場合があるため、以下の投稿に記載されているように extension.vsixmanifest を変更できます。
http://www.gonetdotnet.info/posts/configure-and-use-enterprise-library-5-logging http://www.gonetdotnet.info/posts/how-to-configure-and-use-enterprise-library -5-0-application-blocks-using-nuget-package-manager