'System.IDisposable ServiceStack.JsonHttpClient::__requestAccess()' in assembly - c#

I am using servicestack in one of my Xamarin Android project. Its all working fine if use Linking = 'None' in Android Options. If I change Linking = 'Sdk Assemblies Only' application is not building and its showing below error.
Severity Code Description Project File Line Suppression State
Error The "LinkAssemblies" task failed unexpectedly.
Mono.Linker.MarkException: Error processing method: 'System.IDisposable ServiceStack.JsonHttpClient::__requestAccess()' in assembly:
'ServiceStack.HttpClient.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.IDisposable ServiceStack.LicenseUtils::RequestAccess(System.Object,ServiceStack.LicenseFeature,ServiceStack.LicenseFeature)
at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
at Mono.Linker.Steps.MarkStep.Process()
at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() MY.XForms.Droid
Can any one help me out from this.
TIA.

Related

Error The "ResolvePackageFileConflicts" task failed unexpectedly. System.ArgumentException: Illegal characters in path

This is the error I'm getting when I am trying to build a solution. I tried commenting the Item groups individually one by one and fix the issue but it isn't solved.
Severity Code Description Project File Line Suppression State
Error The "ResolvePackageFileConflicts" task failed unexpectedly.
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.GetFileName(String path)
at Microsoft.NET.Build.Tasks.ItemUtilities.GetTargetPath(ITaskItem item)
at Microsoft.NET.Build.Tasks.ItemUtilities.GetReferenceTargetPath(ITaskItem item)
at Microsoft.NET.Build.Tasks.ConflictResolution.ResolvePackageFileConflicts.<>c.<ExecuteCore>b__44_7(ConflictItem ci)
at Microsoft.NET.Build.Tasks.ConflictResolution.ConflictResolver`1.ResolveConflicts(IEnumerable`1 conflictItems, Func`2 getItemKey, ConflictCallback`1 foundConflict, Boolean commitWinner)
at Microsoft.NET.Build.Tasks.ConflictResolution.ResolvePackageFileConflicts.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() CocoonIT
I'm trying to build a solution and was getting this error and I'm not sure how to resolve it.
I have tried commenting the ItemGroups one by one in the csproj file but it didn't solve this.
Could you please help me in resolving this

Why doesn't :cd command work in ScriptCS shell? (error CS1525)

world! I just started with C# and I have a problem with changing working directory in ScriptCS shell. Basically every time I do :cd <my dir>, it prints this error in the console:
System.Exception: Argument is not a valid expression: <my dir> ---> Microsoft.CodeAnalysis.Scripting.CompilationErrorException: (1,3): error CS1525: Invalid expression term ''
at Microsoft.CodeAnalysis.Scripting.Script.CompilationError(DiagnosticBag diagnostics)
at Microsoft.CodeAnalysis.Scripting.Script.GetExecutor(CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Scripting.Script.Run(Object globals)
at ScriptCs.Engine.Roslyn.CSharpScriptEngine.GetScriptState(String code, Object globals)
at ScriptCs.Engine.Roslyn.CommonScriptEngine.Execute(String code, Object globals, SessionState`1 sessionState)
--- End of inner exception stack trace ---
at ScriptCs.Repl.Execute(String script, String[] scriptArgs)
How do I fix this? Thanks in advance for your help!

Enterprise Library issue

We are using Enterprise Library 6.0 and the following code to create database instance and execute a stored procedure? Any help highly appreciated. Thanks in Advance.
DatabaseProviderFactory factory = new DatabaseProviderFactory();
Database db = factory.CreateDefault();
DbCommand dbCommand = db.GetStoredProcCommand("ProcedureName");
OracleParameter outval = new OracleParameter("Test", OracleDbType.RefCursor);
outval.Direction = ParameterDirection.Output;
dbCommand.Parameters.Add(outval);
using (IDataReader reader = db.ExecuteReader(dbCommand))
{
while (reader.Read())
{
}
}
<add name="providerConnString" connectionString="Data Source=ABCD;Password=testuser;User ID=testpwd" providerName="Oracle.DataAccess.Client" />
Intermittently we are receiving the following exception. This is occurring when we are trying to access the application after an idle time. How the connection pooling happens in enterprise library?How will it work if the application is idle for long time? What is the default min pool size and default max pool size?
Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. --->
System.TypeInitializationException: The type initializer for
'Oracle.DataAccess.Client.OracleClientFactory' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.CThreadPool' threw an exception. --->
System.Runtime.InteropServices.COMException: Retrieving the COM class
factory for component with CLSID
{CB2F6723-AB3A-11D2-9C40-00C04FA30A3E} failed due to the following
error: 800703fa Illegal operation attempted on a registry key that has
been marked for deletion. (Exception from HRESULT: 0x800703FA). at
Oracle.DataAccess.Client.CThreadPool..cctor() --- End of inner
exception stack trace --- at
Oracle.DataAccess.Client.OracleInit.Initialize() --- End of inner
exception stack trace --- --- End of inner exception stack trace
--- at System.RuntimeFieldHandle.GetValue(RtFieldInfo field, Object instance, RuntimeType fieldType, RuntimeType declaringType, Boolean&
domainInitialized) at
System.Reflection.RtFieldInfo.UnsafeGetValue(Object obj) at
System.Reflection.RtFieldInfo.InternalGetValue(Object obj,
StackCrawlMark& stackMark) at
System.Reflection.RtFieldInfo.GetValue(Object obj) at
System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
at
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDefaultMapping(String
dbProviderName) at
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDatabaseData(ConnectionStringSettings
connectionString, DatabaseSettings databaseSettings) at
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDatabase(String
name) at
Microsoft.Practices.EnterpriseLibrary.Data.DatabaseProviderFactory.DatabaseConfigurationBuilder.b__2(String
n) at
System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey
key, Func2 valueFactory) at
Microsoft.Practices.EnterpriseLibrary.Data.DatabaseProviderFactory.DatabaseConfigurationBuilder.CreateDefault()
I had a issue with the App pool identity user in IIS. I removed the identity user and put the default identity user. Then reverted back to my custom user identity. This resolved my issue.

Python.CreateEngine() eventually throws System.Reflection.TargetInvocationException

After several cycles of debugging, Python.CreateEngine() eventually throws the exception shown below. I don't know why this is occurring and the version that I have installed is actually 2.7.4.1. I end up reinstalling IronPython and the exception disappears, but it eventually returns. I am using VS2010 with Windows 7.
System.Reflection.TargetInvocationException occurred
HResult=-2146232828
Message=Failed to load language 'IronPython 2.7.2.1': Method not found: '!!1[] Microsoft.Scripting.Utils.ArrayUtils.ConvertAll(!!0[], System.Func`2<!!0,!!1>)'.
Source=Microsoft.Scripting
StackTrace:
at Microsoft.Scripting.Runtime.LanguageConfiguration.LoadLanguageContext(ScriptDomainManager domainManager, Boolean& alreadyLoaded)
at Microsoft.Scripting.Runtime.DlrConfiguration.LoadLanguageContext(ScriptDomainManager manager, LanguageConfiguration config)
at Microsoft.Scripting.Runtime.DlrConfiguration.TryLoadLanguage(ScriptDomainManager manager, AssemblyQualifiedTypeName providerName, LanguageContext& language)
at Microsoft.Scripting.Runtime.ScriptDomainManager.GetLanguageByTypeName(String providerAssemblyQualifiedTypeName)
at Microsoft.Scripting.Hosting.ScriptRuntime.GetEngineByTypeName(String assemblyQualifiedTypeName)
at IronPython.Hosting.Python.GetEngine(ScriptRuntime runtime)
at IronPython.Hosting.Python.CreateEngine()
at OneWireTest.Form1.InitializeScriptEngine() in D:\IPYTest\Form1.cs:line 374
InnerException: System.MissingMethodException
HResult=-2146233069
Message=Method not found: '!!1[] Microsoft.Scripting.Utils.ArrayUtils.ConvertAll(!!0[], System.Func`2<!!0,!!1>)'.
Source=IronPython
StackTrace:
at IronPython.Runtime.PythonContext..ctor(ScriptDomainManager manager, IDictionary`2 options)
InnerException:

IBatis.net converting project from VS2003 to VS2008 crashes on load

The project has been working fine in 2003 but when opening it in 2008 we now get the below error. I've tried ripping all of the code out of the 'Accessory' result map and then it just goes onto the next result map and tells me the same error with that one. Any thoughts?
[ERROR]-- Accessing Accessory Datasource --
Error: Data connection configurations are invalid.
Descriptive: Net.Autodata.Accessories.Exceptions.AccessoryConnectException: Failed loading iBATIS.NET Default SQL MAP ---> IBatisNet.Common.Exceptions.ConfigurationException:
- The error occurred while loading SqlMap.
- initialize ResultMap
- The error occurred in .
- Check the Accessories.Accessory. ---> IBatisNet.Common.Exceptions.ConfigurationException: Could not configure ResultMap named "Accessories.Accessory", Cause: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at IBatisNet.Common.Utilities.Objects.ObjectFactory.CreateFactory(Type typeToCreate, Type[] types)
at IBatisNet.DataMapper.Configuration.ResultMapping.ResultMap.GetChildNode(ConfigurationScope configScope)
at IBatisNet.DataMapper.Configuration.ResultMapping.ResultMap.Initialize(ConfigurationScope configScope)
--- End of inner exception stack trace ---
at IBatisNet.DataMapper.Configuration.ResultMapping.ResultMap.Initialize(ConfigurationScope configScope)
at IBatisNet.DataMapper.Configuration.Serializers.ResultMapDeSerializer.Deserialize(XmlNode node, ConfigurationScope configScope)
at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.BuildResultMap()
at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureSqlMap()
at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize()
at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao)
--- End of inner exception stack trace ---
at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao)
at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, Boolean useConfigFileWatcher)
at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(String resource, ConfigureHandler configureDelegate)
at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(ConfigureHandler configureDelegate)
at IBatisNet.DataMapper.Mapper.InitMapper()
at IBatisNet.DataMapper.Mapper.Instance()
at Net.Autodata.Accessories.Processing.Editor.AccessoryEditor..ctor() in C:\Perforce\Clients\GM\Accessories\Editor\main\Editor.Processing\AccessoryEditor.cs:line 94
--- End of inner exception stack trace ---
at Net.Autodata.Accessories.Processing.Editor.AccessoryEditor..ctor() in C:\Perforce\Clients\GM\Accessories\Editor\main\Editor.Processing\AccessoryEditor.cs:line 98
at Net.Autodata.Accessories.Editor.AccessoryEditor.LoadEditor() in C:\Perforce\Clients\GM\Accessories\Editor\main\Editor\AccessoryEditor.cs:line 1028
Project was originally compiled with .Net v1.1 Upgraded IBatis DLL's to 2.0 and now it works fine.

Categories