App.config 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <configuration>
  3. <configSections>
  4. <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
  5. <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  6. <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
  7. </configSections>
  8. <startup>
  9. <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
  10. </startup>
  11. <connectionStrings>
  12. <add name="XMLFilePath" connectionString="Resources/XMLData/SystemData.XML"/>
  13. <add name="LogAppPath" connectionString="Log\\Nlog"/>
  14. <add name="LogPath" connectionString="Log\\Nlog"/>
  15. <add name="XMLFileName" connectionString="Config/ProData/HardwareConfig.xml"/>
  16. </connectionStrings>
  17. <nlog>
  18. <!-- optional, add some variables
  19. https://github.com/nlog/NLog/wiki/Configuration-file#variables
  20. -->
  21. <variable name="myvar" value="myvalue"/>
  22. <!--
  23. See https://github.com/nlog/nlog/wiki/Configuration-file
  24. for information on customizing logging rules and outputs.
  25. -->
  26. <targets async="true">
  27. <target type="File" name="file" fileName="${basedir}/Log/Nlogs/OTS ${shortdate}.log" layout="${longdate} ${message}"/>
  28. <target name="control" type="RichTextBox" controlName="richTextBox_Nlog" formName="OTSMeasureOutputNlog" maxLines="10000" autoScroll="true" useDefaultRowColoringRules="true" layout="${longdate} ${message}"/>
  29. </targets>
  30. <rules>
  31. <!-- add your logging rules here -->
  32. <logger name="*" minlevel="Trace" writeTo="control"/>
  33. <logger name="*" minlevel="Trace" writeTo="File"/>
  34. </rules>
  35. </nlog>
  36. <entityFramework>
  37. <providers>
  38. <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
  39. <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
  40. </providers>
  41. </entityFramework>
  42. <system.data>
  43. <DbProviderFactories>
  44. <remove invariant="System.Data.SQLite.EF6"/>
  45. <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
  46. <remove invariant="System.Data.SQLite"/><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/></DbProviderFactories>
  47. </system.data>
  48. </configuration>