Index: src/log4net/Appender/AdoNetAppender.cs =================================================================== --- src/log4net/Appender/AdoNetAppender.cs (revision 1606952) +++ src/log4net/Appender/AdoNetAppender.cs (working copy) @@ -643,7 +643,7 @@ connectionStringContext = "ConnectionString"; return m_connectionString; } - +#if !__MOBILE__ if (!String.IsNullOrEmpty(m_connectionStringName)) { ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings[m_connectionStringName]; @@ -657,6 +657,7 @@ throw new LogException("Unable to find [" + m_connectionStringName + "] ConfigurationManager.ConnectionStrings item"); } } +#endif if (m_appSettingsKey != null && m_appSettingsKey.Length > 0) { Index: src/log4net/Appender/AspNetTraceAppender.cs =================================================================== --- src/log4net/Appender/AspNetTraceAppender.cs (revision 1606952) +++ src/log4net/Appender/AspNetTraceAppender.cs (working copy) @@ -17,7 +17,7 @@ // #endregion -#if !NETCF && !CLIENT_PROFILE +#if !NETCF && !CLIENT_PROFILE && !__MOBILE__ using System.Web; Index: src/log4net/Appender/EventLogAppender.cs =================================================================== --- src/log4net/Appender/EventLogAppender.cs (revision 1606952) +++ src/log4net/Appender/EventLogAppender.cs (working copy) @@ -17,7 +17,7 @@ // #endregion -#if !NETCF +#if !NETCF && !__MOBILE__ using System; using System.Diagnostics; Index: src/log4net/Appender/ManagedColoredConsoleAppender.cs =================================================================== --- src/log4net/Appender/ManagedColoredConsoleAppender.cs (revision 1606952) +++ src/log4net/Appender/ManagedColoredConsoleAppender.cs (working copy) @@ -20,7 +20,7 @@ // Compatibility: // http://msdn.microsoft.com/en-us/library/system.console.foregroundcolor.aspx // Disable for unsupported targets -#if !NETCF +#if !NETCF && !__MOBILE__ // The original ColoredConsoleAppender was written before the .NET framework // (and Mono) had built-in support for console colors so it was written using Index: src/log4net/Config/DOMConfigurator.cs =================================================================== --- src/log4net/Config/DOMConfigurator.cs (revision 1606952) +++ src/log4net/Config/DOMConfigurator.cs (working copy) @@ -287,7 +287,7 @@ #region ConfigureAndWatch static methods -#if !NETCF +#if !NETCF && !__MOBILE__ /// /// Configures log4net using the file specified, monitors the file for changes Index: src/log4net/Config/Log4NetConfigurationSectionHandler.cs =================================================================== --- src/log4net/Config/Log4NetConfigurationSectionHandler.cs (revision 1606952) +++ src/log4net/Config/Log4NetConfigurationSectionHandler.cs (working copy) @@ -18,7 +18,7 @@ #endregion // .NET Compact Framework 1.0 has no support for application .config files -#if !NETCF +#if !NETCF && !__MOBILE__ using System.Configuration; using System.Xml; Index: src/log4net/Config/XmlConfigurator.cs =================================================================== --- src/log4net/Config/XmlConfigurator.cs (revision 1606952) +++ src/log4net/Config/XmlConfigurator.cs (working copy) @@ -162,7 +162,7 @@ LogLog.Debug(declaringType, "Application config file location unknown"); } -#if NETCF +#if NETCF || __MOBILE__ // No config file reading stuff. Just go straight for the file Configure(repository, new FileInfo(SystemInfo.ConfigurationFileLocation)); #else @@ -772,7 +772,7 @@ #region ConfigureAndWatch static methods -#if !NETCF +#if !NETCF && !__MOBILE__ /// /// Configures log4net using the file specified, monitors the file for changes @@ -893,7 +893,7 @@ #region ConfigureAndWatchHandler -#if !NETCF +#if !NETCF && !__MOBILE__ /// /// Class used to watch config files. /// Index: src/log4net/Config/XmlConfiguratorAttribute.cs =================================================================== --- src/log4net/Config/XmlConfiguratorAttribute.cs (revision 1606952) +++ src/log4net/Config/XmlConfiguratorAttribute.cs (working copy) @@ -150,6 +150,7 @@ set { m_configFileExtension = value; } } +#if !__MOBILE__ /// /// Gets or sets a value indicating whether to watch the configuration file. /// @@ -174,6 +175,7 @@ get { return m_configureAndWatch; } set { m_configureAndWatch = value; } } +#endif #endregion Public Instance Properties @@ -310,6 +312,7 @@ /// the FileInfo pointing to the config file private void ConfigureFromFile(ILoggerRepository targetRepository, FileInfo configFile) { +#if !__MOBILE__ // Do we configure just once or do we configure and then watch? if (m_configureAndWatch) { @@ -316,9 +319,11 @@ XmlConfigurator.ConfigureAndWatch(targetRepository, configFile); } else +#endif { XmlConfigurator.Configure(targetRepository, configFile); } + } /// @@ -423,10 +428,12 @@ } else { +#if !__MOBILE__ if (m_configureAndWatch) { LogLog.Warn(declaringType, "XmlConfiguratorAttribute: Unable to watch config file loaded from a URI"); } +#endif XmlConfigurator.Configure(targetRepository, fullPath2ConfigFile); } } @@ -436,7 +443,9 @@ private string m_configFile = null; private string m_configFileExtension = null; +#if !__MOBILE__ private bool m_configureAndWatch = false; +#endif #endregion Private Instance Fields Index: src/log4net/Core/DefaultRepositorySelector.cs =================================================================== --- src/log4net/Core/DefaultRepositorySelector.cs (revision 1606952) +++ src/log4net/Core/DefaultRepositorySelector.cs (working copy) @@ -703,6 +703,7 @@ repositoryConfigFilePath = Path.Combine(applicationBaseDirectory, repositoryConfigFile); } +#if !__MOBILE__ // Determine whether to watch the file or not based on an app setting value: bool watchRepositoryConfigFile = false; #if !NETCF @@ -723,7 +724,6 @@ } } #endif - if (watchRepositoryConfigFile) { // As we are going to watch the config file it is required to resolve it as a @@ -749,6 +749,7 @@ } } else +#endif { // As we are not going to watch the config file it is easiest to just resolve it as a // URI and pass that to the Configurator Index: src/log4net/Layout/Pattern/AspNetCachePatternConverter.cs =================================================================== --- src/log4net/Layout/Pattern/AspNetCachePatternConverter.cs (revision 1606952) +++ src/log4net/Layout/Pattern/AspNetCachePatternConverter.cs (working copy) @@ -18,7 +18,7 @@ #endregion // .NET Compact Framework has no support for ASP.NET -#if !NETCF && !CLIENT_PROFILE +#if !NETCF && !CLIENT_PROFILE && !__MOBILE__ using System.IO; using System.Web; Index: src/log4net/Layout/Pattern/AspNetContextPatternConverter.cs =================================================================== --- src/log4net/Layout/Pattern/AspNetContextPatternConverter.cs (revision 1606952) +++ src/log4net/Layout/Pattern/AspNetContextPatternConverter.cs (working copy) @@ -18,7 +18,7 @@ #endregion // .NET Compact Framework has no support for ASP.NET -#if !NETCF && !CLIENT_PROFILE +#if !NETCF && !CLIENT_PROFILE && !__MOBILE__ using System.IO; using System.Web; Index: src/log4net/Layout/Pattern/AspNetPatternConverter.cs =================================================================== --- src/log4net/Layout/Pattern/AspNetPatternConverter.cs (revision 1606952) +++ src/log4net/Layout/Pattern/AspNetPatternConverter.cs (working copy) @@ -18,7 +18,7 @@ #endregion // .NET Compact Framework has no support for ASP.NET -#if !NETCF && !CLIENT_PROFILE +#if !NETCF && !CLIENT_PROFILE && !__MOBILE__ using System.IO; using System.Web; Index: src/log4net/Layout/Pattern/AspNetRequestPatternConverter.cs =================================================================== --- src/log4net/Layout/Pattern/AspNetRequestPatternConverter.cs (revision 1606952) +++ src/log4net/Layout/Pattern/AspNetRequestPatternConverter.cs (working copy) @@ -18,7 +18,7 @@ #endregion // .NET Compact Framework has no support for ASP.NET -#if !NETCF && !CLIENT_PROFILE +#if !NETCF && !CLIENT_PROFILE && !__MOBILE__ using System.IO; using System.Web; Index: src/log4net/Layout/Pattern/AspNetSessionPatternConverter.cs =================================================================== --- src/log4net/Layout/Pattern/AspNetSessionPatternConverter.cs (revision 1606952) +++ src/log4net/Layout/Pattern/AspNetSessionPatternConverter.cs (working copy) @@ -18,7 +18,7 @@ #endregion // .NET Compact Framework has no support for ASP.NET -#if !NETCF && !CLIENT_PROFILE +#if !NETCF && !CLIENT_PROFILE && !__MOBILE__ using System.IO; using System.Web; Index: src/log4net/Layout/PatternLayout.cs =================================================================== --- src/log4net/Layout/PatternLayout.cs (revision 1606952) +++ src/log4net/Layout/PatternLayout.cs (working copy) @@ -860,7 +860,7 @@ s_globalRulesRegistry.Add("n", typeof(NewLinePatternConverter)); // .NET Compact Framework has no support for ASP.NET -#if !NETCF && !CLIENT_PROFILE +#if !NETCF && !CLIENT_PROFILE && !__MOBILE__ s_globalRulesRegistry.Add("aspnet-cache", typeof(AspNetCachePatternConverter)); s_globalRulesRegistry.Add("aspnet-context", typeof(AspNetContextPatternConverter)); s_globalRulesRegistry.Add("aspnet-request", typeof(AspNetRequestPatternConverter)); Index: src/log4net/log4net.android.csproj =================================================================== --- src/log4net/log4net.android.csproj (revision 0) +++ src/log4net/log4net.android.csproj (working copy) @@ -0,0 +1,715 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {0D035690-8952-43F8-8CE2-136B1F14F2E4} + {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Library + Properties + log4net.android + log4net.android + 512 + Resources\Resource.Designer.cs + Off + True + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + \ No newline at end of file Index: src/log4net/log4net.iOS.csproj =================================================================== --- src/log4net/log4net.iOS.csproj (revision 0) +++ src/log4net/log4net.iOS.csproj (working copy) @@ -0,0 +1,697 @@ + + + + Debug + iPhoneSimulator + 8.0.30703 + 2.0 + {36629014-0723-4D25-822E-4353D83BE192} + {6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Library + log4net.iOS + Resources + log4net.iOS + + + true + full + false + bin\iPhone\Debug + DEBUG + prompt + 4 + false + true + iPhone Developer + + + none + true + bin\iPhone\Release + prompt + 4 + false + iPhone Developer + + + + + + + + + + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + \ No newline at end of file Index: src/log4net/log4net.vs2010.sln =================================================================== --- src/log4net/log4net.vs2010.sln (revision 1606952) +++ src/log4net/log4net.vs2010.sln (working copy) @@ -1,29 +1,15 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "log4net.vs2010", "log4net.vs2010.csproj", "{181FE707-E161-4722-9F38-6AAAB6FAA106}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "log4net.Tests.vs2010", "..\log4net.Tests\log4net.Tests.vs2010.csproj", "{B0530F10-0238-49A9-93B0-8EF412E90BCF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "log4net.android", "log4net.android.csproj", "{0D035690-8952-43F8-8CE2-136B1F14F2E4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "log4net.iOS", "log4net.iOS.csproj", "{36629014-0723-4D25-822E-4353D83BE192}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -38,6 +24,14 @@ {B0530F10-0238-49A9-93B0-8EF412E90BCF}.Debug|Any CPU.Build.0 = Debug|Any CPU {B0530F10-0238-49A9-93B0-8EF412E90BCF}.Release|Any CPU.ActiveCfg = Release|Any CPU {B0530F10-0238-49A9-93B0-8EF412E90BCF}.Release|Any CPU.Build.0 = Release|Any CPU + {0D035690-8952-43F8-8CE2-136B1F14F2E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D035690-8952-43F8-8CE2-136B1F14F2E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D035690-8952-43F8-8CE2-136B1F14F2E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D035690-8952-43F8-8CE2-136B1F14F2E4}.Release|Any CPU.Build.0 = Release|Any CPU + {36629014-0723-4D25-822E-4353D83BE192}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36629014-0723-4D25-822E-4353D83BE192}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36629014-0723-4D25-822E-4353D83BE192}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36629014-0723-4D25-822E-4353D83BE192}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Index: src/log4net/Util/PatternString.cs =================================================================== --- src/log4net/Util/PatternString.cs (revision 1606952) +++ src/log4net/Util/PatternString.cs (working copy) @@ -286,7 +286,7 @@ s_globalRulesRegistry.Add("appdomain", typeof(AppDomainPatternConverter)); s_globalRulesRegistry.Add("date", typeof(DatePatternConverter)); -#if !NETCF +#if !NETCF && !__MOBILE__ s_globalRulesRegistry.Add("env", typeof(EnvironmentPatternConverter)); s_globalRulesRegistry.Add("envFolderPath", typeof(EnvironmentFolderPathPatternConverter)); #endif Index: src/log4net/Util/PatternStringConverters/EnvironmentPatternConverter.cs =================================================================== --- src/log4net/Util/PatternStringConverters/EnvironmentPatternConverter.cs (revision 1606952) +++ src/log4net/Util/PatternStringConverters/EnvironmentPatternConverter.cs (working copy) @@ -18,7 +18,7 @@ #endregion // .NET Compact Framework 1.0 has no support for Environment.GetEnvironmentVariable() -#if !NETCF +#if !NETCF && !__MOBILE__ using System; using System.Text; Index: src/log4net/Util/SystemInfo.cs =================================================================== --- src/log4net/Util/SystemInfo.cs (revision 1606952) +++ src/log4net/Util/SystemInfo.cs (working copy) @@ -451,6 +451,7 @@ { try { +#if !__IOS__ #if FRAMEWORK_4_0_OR_ABOVE if (myAssembly.IsDynamic) { @@ -467,6 +468,7 @@ } #endif else +#endif { // This call requires FileIOPermission for access to the path // if we don't have permission then we just ignore it and @@ -922,7 +924,7 @@ /// public static string GetAppSetting(string key) { -#if NETCF +#if NETCF || __MOBILE__ // Configuration APIs are not suported under the Compact Framework #else try