App.config 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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="TestData.XML"/>-->
  13. <add name="XMLFilePath" connectionString="Resources/XMLData/SystemData.XML"/>
  14. </connectionStrings>
  15. <nlog>
  16. <!-- optional, add some variables
  17. https://github.com/nlog/NLog/wiki/Configuration-file#variables
  18. -->
  19. <variable name="myvar" value="myvalue"/>
  20. <!--
  21. See https://github.com/nlog/nlog/wiki/Configuration-file
  22. for information on customizing logging rules and outputs.
  23. -->
  24. <targets async="true">
  25. <target type="File" name="file" fileName="${basedir}/Log/Nlogs/OTS ${shortdate}.log" layout="${longdate} ${message}"/>
  26. <target name="control" type="RichTextBox" controlName="richTextBox_Nlog" formName="OutputNlog" maxLines="10000" autoScroll="true" useDefaultRowColoringRules="true" layout="${longdate} ${message}"/>
  27. </targets>
  28. <rules>
  29. <!-- add your logging rules here -->
  30. <logger name="*" minlevel="Trace" writeTo="control"/>
  31. <logger name="*" minlevel="Trace" writeTo="File"/>
  32. </rules>
  33. </nlog>
  34. <runtime>
  35. <gcConcurrent enabled="true"/>
  36. <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  37. <publisherPolicy apply="yes"/>
  38. <probing privatePath="ReportClrDll\"/>
  39. </assemblyBinding>
  40. </runtime>
  41. <entityFramework>
  42. <providers>
  43. <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
  44. <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
  45. </providers>
  46. </entityFramework>
  47. <system.data>
  48. <DbProviderFactories>
  49. <remove invariant="System.Data.SQLite.EF6"/>
  50. <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"/>
  51. <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>
  52. </system.data>
  53. </configuration>