I downloaded an open source epub reader called AePubReader its working fine.But When i tried to integrate with my application in xcode 4.6 it shows lots of errors due to the ARC .So i selected those files and set "-fno-objc-arc" flag .But after that it shows error like #include <libxml/tree.h> not found![this is the error i got ][1]
$(SDK_DIR)"/usr/include/libxml2 i added this line then that problem is solved but after that it shows "43 Errors" something like " Apple Mach-O Linker Error"most of them related to xml files
My error message
Undefined symbols for architecture i386:
"_htmlParseDoc", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_htmlReadMemory", referenced from:
-[CXHTMLDocument initWithXHTMLData:encoding:options:error:] in CXHTMLDocument.o
"_xmlAddChild", referenced from:
-[CXMLDocument(CXMLDocument_CreationExtensions) addChild:] in CXMLDocument_CreationExtensions.o
-[CXMLElement(CXMLElement_CreationExtensions) addChild:] in CXMLElement_CreationExtensions.o
-[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o
"_xmlAddPrevSibling", referenced from:
-[CXMLDocument(CXMLDocument_CreationExtensions) insertChild:atIndex:] in CXMLDocument_CreationExtensions.o
"_xmlCopyNode", referenced from:
-[CXMLNode copyWithZone:] in CXMLNode.o
"_xmlDocDumpFormatMemory", referenced from:
-[CXMLDocument description] in CXMLDocument.o
"_xmlDocDumpMemory", referenced from:
-[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o
"_xmlDocGetRootElement", referenced from:
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
-[CXMLDocument rootElement] in CXMLDocument.o
"_xmlDocSetRootElement", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_xmlFree", referenced from:
-[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o
-[CXMLDocument description] in CXMLDocument.o
"_xmlFreeDoc", referenced from:
-[CXMLDocument dealloc] in CXMLDocument.o
"_xmlFreeNode", referenced from:
-[CXMLNode dealloc] in CXMLNode.o
"_xmlGetCharEncodingName", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_xmlGetLastError", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
"_xmlNewDoc", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) document] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
"_xmlNewNode", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:stringValue:] in CXMLNode_CreationExtensions.o
"_xmlNewNs", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o
"_xmlNewPI", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) processingInstructionWithName:stringValue:] in CXMLNode_CreationExtensions.o
"_xmlNewText", referenced from:
-[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o
"_xmlNodeDumpOutput", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlNodeSetContent", referenced from:
-[CXMLNode(CXMLNode_CreationExtensions) setStringValue:] in CXMLNode_CreationExtensions.o
"_xmlOutputBufferClose", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlOutputBufferCreateIO", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlOutputBufferFlush", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlParseDoc", referenced from:
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
"_xmlReadMemory", referenced from:
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
"_xmlResetLastError", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
"_xmlSetNs", referenced from:
-[CXMLElement(CXMLElement_CreationExtensions) addNamespace:] in CXMLElement_CreationExtensions.o
"_xmlStrcmp", referenced from:
-[CXMLElement elementsForName:] in CXMLElement.o
-[CXMLElement elementsForLocalName:URI:] in CXMLElement.o
-[CXMLElement attributeForName:] in CXMLElement.o
-[CXMLElement attributeForLocalName:URI:] in CXMLElement.o
-[CXMLElement namespaceForPrefix:] in CXMLElement.o
-[CXMLElement resolvePrefixForNamespaceURI:] in CXMLElement.o
"_xmlXPathEvalExpression", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathFreeContext", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathFreeObject", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathNewContext", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathRegisterNs", referenced from:
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
"_htmlParseDoc", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_htmlReadMemory", referenced from:
-[CXHTMLDocument initWithXHTMLData:encoding:options:error:] in CXHTMLDocument.o
"_xmlAddChild", referenced from:
-[CXMLDocument(CXMLDocument_CreationExtensions) addChild:] in CXMLDocument_CreationExtensions.o
-[CXMLElement(CXMLElement_CreationExtensions) addChild:] in CXMLElement_CreationExtensions.o
-[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o
"_xmlAddPrevSibling", referenced from:
-[CXMLDocument(CXMLDocument_CreationExtensions) insertChild:atIndex:] in CXMLDocument_CreationExtensions.o
"_xmlCopyNode", referenced from:
-[CXMLNode copyWithZone:] in CXMLNode.o
"_xmlDocDumpFormatMemory", referenced from:
-[CXMLDocument description] in CXMLDocument.o
"_xmlDocDumpMemory", referenced from:
-[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o
"_xmlDocGetRootElement", referenced from:
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
-[CXMLDocument rootElement] in CXMLDocument.o
"_xmlDocSetRootElement", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_xmlFree", referenced from:
-[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o
-[CXMLDocument description] in CXMLDocument.o
"_xmlFreeDoc", referenced from:
-[CXMLDocument dealloc] in CXMLDocument.o
"_xmlFreeNode", referenced from:
-[CXMLNode dealloc] in CXMLNode.o
"_xmlGetCharEncodingName", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_xmlGetLastError", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
"_xmlNewDoc", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) document] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
"_xmlNewNode", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:stringValue:] in CXMLNode_CreationExtensions.o
"_xmlNewNs", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o
"_xmlNewPI", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) processingInstructionWithName:stringValue:] in CXMLNode_CreationExtensions.o
"_xmlNewText", referenced from:
-[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o
"_xmlNodeDumpOutput", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlNodeSetContent", referenced from:
-[CXMLNode(CXMLNode_CreationExtensions) setStringValue:] in CXMLNode_CreationExtensions.o
"_xmlOutputBufferClose", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlOutputBufferCreateIO", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlOutputBufferFlush", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlParseDoc", referenced from:
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
"_xmlReadMemory", referenced from:
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
"_xmlResetLastError", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
"_xmlSetNs", referenced from:
-[CXMLElement(CXMLElement_CreationExtensions) addNamespace:] in CXMLElement_CreationExtensions.o
"_xmlStrcmp", referenced from:
-[CXMLElement elementsForName:] in CXMLElement.o
-[CXMLElement elementsForLocalName:URI:] in CXMLElement.o
-[CXMLElement attributeForName:] in CXMLElement.o
-[CXMLElement attributeForLocalName:URI:] in CXMLElement.o
-[CXMLElement namespaceForPrefix:] in CXMLElement.o
-[CXMLElement resolvePrefixForNamespaceURI:] in CXMLElement.o
"_xmlXPathEvalExpression", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathFreeContext", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathFreeObject", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathNewContext", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathRegisterNs", referenced from:
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You have to add "libz.dylib" and "libxml2.dylib" to the "Link Binary With Libraries" items in the "Build Phases" of the target.
Related
I have a column defined in Azure Search index as follows:
{
"name": "agreedValues",
"type": "Collection(Edm.Double)",
"facetable": false,
"filterable": false,
"retrievable": true,
"analyzer": null,
"indexAnalyzer": null,
"searchAnalyzer": null,
"synonymMaps": [],
"fields": []
},
and am running a netcoreapp2.1 Azure Function (v2) with nuget Microsoft.Azure.Search 10.1.0
It works to add documents to the index using a document DTO with corresponding property
public ImmutableList<double> AgreedValues { get; }
(and attribute [SerializePropertyNamesAsCamelCase] on DTO class to fix case issues)
but when I try to merge updates to document the Search API responds with
The request is invalid. Details: parameters : Cannot convert the literal '0.73' to the expected type 'Edm.String'.
from
Microsoft.Rest.Azure.CloudException:
at Microsoft.Azure.Search.DocumentsProxyOperations+<IndexWithHttpMessagesAsync>d__13`1.MoveNext (Microsoft.Azure.Search.Data, Version=10.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.Search.DocumentsOperations+<DoIndexAsync>d__19`1.MoveNext (Microsoft.Azure.Search.Data, Version=10.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.Search.DocumentsOperationsExtensions+<IndexAsync>d__15`1.MoveNext (Microsoft.Azure.Search.Data, Version=10.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
Any ideas/suggestions to resolve are welcome.
I wasn’t able to reproduce this error - could you please share an index definition & index/query request that fails?
I have a project to mantain, this project was developed in an old PC (that sadly is not working anymore), now my boss told me to generate an ear using the ant xml that was being used in the old machine.
When I run the ant I see these errors:
Buildfile: D:\JDeveloper\COBLIN-WEB\Branches\QA\Framework-CRE\Common-ViewController\framework-ant.xml
init-framework:
compile-framework-model:
[javac] Compiling 23 source files to D:\JDeveloper\COBLIN-WEB\branches\QA\Framework-CRE\Common-Model\classes
[javac] D:\JDeveloper\COBLIN-WEB\branches\QA\Framework-CRE\Common-Model\src\bo\com\cre\framework\model\adf\entity\BaseEntityCache.java:2: package oracle.jbo.server does not exist
[javac] import oracle.jbo.server.EntityCache;
[javac] ^
[javac] D:\JDeveloper\COBLIN-WEB\branches\QA\Framework-CRE\Common-Model\src\bo\com\cre\framework\model\adf\entity\BaseEntityCache.java:4: cannot find symbol
[javac] symbol: class EntityCache
[javac] public class BaseEntityCache extends EntityCache{
[javac] ^
[javac] D:\JDeveloper\COBLIN-WEB\branches\QA\Framework-CRE\Common-Model\src\bo\com\cre\framework\model\adf\entity\BaseEntityDefImpl.java:2: package oracle.jbo.server does not exist
[javac] import oracle.jbo.server.EntityDefImpl;
[javac] ^
[javac] D:\JDeveloper\COBLIN-WEB\branches\QA\Framework-CRE\Common-Model\src\bo\com\cre\framework\model\adf\entity\BaseEntityDefImpl.java:4: cannot find symbol
[javac] symbol: class EntityDefImpl
[javac] public class BaseEntityDefImpl extends EntityDefImpl{
[javac]
....
The class mentioned in the first error is:
package bo.com.cre.framework.model.adf.entity;
import oracle.jbo.server.EntityCache;
public class BaseEntityCache extends EntityCache{
public BaseEntityCache() {
super();
}
}
The XML run with ant:
<?xml version="1.0" encoding="windows-1252" ?>
<project xmlns="antlib:org.apache.tools.ant" name="Framework" default="all" basedir=".">
<property file="framework-ant.properties"/>
<property file="${coblin.home}/${deploy.config.dir}/libs-ant.properties"/>
<import file="${coblin.home}/${deploy.config.dir}/libs-ant.xml"/>
<path id="classpath-framework">
<pathelement location="${coblin.home}/${framework.model.dir}/classes"/>
<path refid="classpath"/>
</path>
<!-- info para compilar framwork -->
<target name="all-framework" description="Build the project" depends="clean-framework,compile-framework-model,compile-framework-view,jar-framework"/>
<target name="jar-framework" description="generate common-model.jar, common-view-controller.jar">
<jar destfile="${coblin.home}/${coblin.lib.dir}/common-model.jar" basedir="${coblin.home}/${framework.model.dir}/classes">
<manifest>
<attribute name="Manifest-Version" value="1.0"/>
</manifest>
</jar>
<jar destfile="${coblin.home}/${coblin.lib.dir}/common-view-controller.jar" basedir="${coblin.home}/${framework.view.dir}/classes">
<manifest>
<attribute name="Manifest-Version" value="1.0"/>
</manifest>
</jar>
</target>
<target name="init-framework">
<tstamp/>
<mkdir dir="${coblin.home}/${framework.model.dir}/classes"/>
<mkdir dir="${coblin.home}/${framework.view.dir}/classes"/>
</target>
<target name="clean-framework" description="Clean the project Framework">
<delete includeemptydirs="true" quiet="true">
<fileset dir="${coblin.home}/${framework.model.dir}/classes" includes="**/*"/>
<fileset dir="${coblin.home}/${framework.view.dir}/classes" includes="**/*"/>
</delete>
</target>
<target name="compile-framework-model" description="Compile Java source files of Framework" depends="init-framework">
<javac destdir="${coblin.home}/${framework.model.dir}/classes" classpathref="classpath-framework" debug="${javac.debug}" nowarn="${javac.nowarn}"
deprecation="${javac.deprecation}" encoding="Cp1252" source="1.6" target="1.6">
<src path="${coblin.home}/${framework.model.dir}/src"/>
</javac>
<copy todir="${coblin.home}/${framework.model.dir}/classes">
<fileset dir="${coblin.home}/${framework.model.dir}/src">
<patternset refid="copy.patterns"/>
</fileset>
</copy>
</target>
If I compile and run the project from Jdeveloper it runs ok, but I need to generate the ear
What shoulkd I do?
You need to add the libraries needed to compile to the ANT environment. I guess they are in one of the imported files, but the once included are out of date.
Have you changed JDev version?
Anyway, you can create a new ANT build file from the project. This will generate the includes of the libraries used in the project. Then you look for the libraries in your ANT files and exchange them to the libraries in the newly generated ANT build file.
Timo
I have implemented log4net ver 1.2.13.0 without major problems.(.Net ver 4.51 C#4)
I add an AdoNetAppender following documentation.
But here is my piece of code causing some troubles :
<appender name ="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
<bufferSize value ="1" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
I have a warning message not blocking my app but annoying and very disturbing :
The 'value' attribute is invalid - The value
'System.Data.SqlClient.SqlConnection, System.Data, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' is invalid according
to its datatype 'connectionTypeTypes' - The Enumeration constraint
failed.
Where is the problem and the solution to get rid off this message ?
Many thanks in advance.
The log4net schema file (http://csharptest.net/downloads/schema/log4net.xsd) has this definition:
<xs:enumeration value="System.Data.SqlClient.SqlConnection, System.Data" />
If you change your setting to match this value, the warning will disappear.
I am trying to use PRISM for my application. I have been following Mike Taulty's video s on the same. I would like to know, if there is any sample code available for app.config file mentioned while loading modules without references. What I mean is I am looking to copy paste the configuration related information, instead of typing them from start to avoid mistakes. Also I would liek to know if the version number of the assembly is needed or not in the config file while we follow this approach.
My ModulesCatalog.xaml looks like this:
<Modularity:ModuleCatalog xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Modularity="clr-namespace:Microsoft.Practices.Prism.Modularity;assembly=Microsoft.Practices.Prism">
<Modularity:ModuleInfoGroup InitializationMode="WhenAvailable">
<Modularity:ModuleInfo
Ref="MyCo.Module.SystemManager.SL.xap"
ModuleName="MembershipModule"
ModuleType="MyCo.Module.SystemManager.Module, MyCo.Module.SystemManager.SL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</Modularity:ModuleInfoGroup>
<Modularity:ModuleInfoGroup InitializationMode="OnDemand">
<Modularity:ModuleInfo
Ref="MyCo.Module.Mobile.SL.xap"
ModuleName="MobileModule"
ModuleType="MyCo.Module.Mobile.Module, MyCo.Module.Mobile.SL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Modularity:ModuleInfo
Ref="MyCo.Module.Dispatch.SL.xap"
ModuleName="DispatchModule"
ModuleType="MyCo.Module.Dispatch.Module, MyCo.Module.Dispatch.SL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Modularity:ModuleInfo
Ref="MyCo.Module.Assets.SL.xap"
ModuleName="AssetsModule"
ModuleType="MyCo.Module.Assets.Module, MyCo.Module.Assets.SL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</Modularity:ModuleInfoGroup>
</Modularity:ModuleCatalog>
I would also check PRISM samples (in PRISM installation folder)
Version needed, yes
This is only the 2nd time I've tried to use log4net. This is a Windows form app and I thought things are set up OK but I was not getting any logfile created. I found some advice about needing to explicitly make it read the app.config file so I added log4net.Config.XmlConfigurator.Configure() here:
public partial class GridForm : Form
{
public static readonly ILog log = LogManager.GetLogger(typeof(GridForm));
public GridForm()
{
InitializeComponent();
// Initialize log4net (make him read the app.config file)
log4net.Config.XmlConfigurator.Configure(); // this gives the exception
}
I have a little uncertainty about how I'm referencing the log4net.dll.
I have 2 projects in the solution - CBMI.Common which is a class library project and CBMI.WinFormsUI which is my forms project (startup form).
I copied log4net.dll to the bin directory of CBMI.Common (NOT the bin\debug folder)
then added a reference in my forms project that points to that location: CBMI.Common\bin
This compiles without error. I think that it should be OK, but...
I cannot determine what to do from the exception raised and messages shown:
System.IO.FileNotFoundException crossed a native/managed boundary
Message=Could not load file or assembly 'Log4net' or one of its dependencies. The system cannot find the file specified.
Source=mscorlib
FileName=Log4net
FusionLog==== Pre-bind state information ===
LOG: User = HPpavilion\john
LOG: DisplayName = Log4net
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Log4net | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/john/documents/visual studio 2010/Projects/CBMI.LatitudePostConverter/CBMI.WinFormsUI/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\john\documents\visual studio 2010\Projects\CBMI.LatitudePostConverter\CBMI.WinFormsUI\bin\Debug\CBMI.WinFormsUI.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/john/documents/visual studio 2010/Projects/CBMI.LatitudePostConverter/CBMI.WinFormsUI/bin/Debug/Log4net.DLL.
LOG: Attempting download of new URL file:///C:/Users/john/documents/visual studio 2010/Projects/CBMI.LatitudePostConverter/CBMI.WinFormsUI/bin/Debug/Log4net/Log4net.DLL.
LOG: Attempting download of new URL file:///C:/Users/john/documents/visual studio 2010/Projects/CBMI.LatitudePostConverter/CBMI.WinFormsUI/bin/Debug/Log4net.EXE.
LOG: Attempting download of new URL file:///C:/Users/john/documents/visual studio 2010/Projects/CBMI.LatitudePostConverter/CBMI.WinFormsUI/bin/Debug/Log4net/Log4net.EXE.
StackTrace:
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.GetConfigType(String typeName, Boolean throwOnError)
at System.Configuration.Internal.DelegatingConfigHost.GetConfigType(String typeName, Boolean throwOnError)
at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
InnerException:
For completeness, I will add the app.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="CBMI.WinFormsUI.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net"/>
</configSections>
<userSettings>
<CBMI.WinFormsUI.Properties.Settings>
<setting name="DefaultRootFolder" serializeAs="String">
<value />
</setting>
</CBMI.WinFormsUI.Properties.Settings>
</userSettings>
<log4net>
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="log-file.txt"/>
<param name="AppendToFile" value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="10MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%-5p%d{yyyy-MM-dd hh:mm:ss} – %m%n"/>
</layout>
</appender>
<root>
<level value="DEBUG"/>
<appender-ref ref="LogFileAppender"/>
</root>
</log4net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
The fix for me was to insert [assembly: log4net.Config.XmlConfigurator(Watch = true)] into assemblyinfo.cs