SvcUtil fails generating XmlSerializer classes - wcf

I've generated WCF Proxy classes using svcutil. And now I am trying to generate XmlSerializer classes. svcUtil throws this error:
Generating XML serializers...
Error: An error occurred in the tool.
Error: Unable to generate a temporary class (result=1).
error CS1647: An expression is too long or complex to compile
Can anyone advise? Is there any option to see this error details?
Using .Net fw 4.0.

Related

Apache Ignite .Net Core failed to start

Apache ignite .net core server node fails to start with below error, any idea what could be the reason?
Apache.Ignite.Core.Binary.BinaryObjectException
HResult = -2146233088,
Message = Unexpected field type [pos=42559, expected=String, actual=0]
StackTrace:
class org.apache.ignite.binary.BinaryObjectException: Unexpected field type [pos=42559, expected=String, actual=0]
at org.apache.ignite.internal.binary.BinaryReaderExImpl.checkFlagNoHandles(BinaryReaderExImpl.java:1684)
at org.apache.ignite.internal.binary.BinaryReaderExImpl.readString(BinaryReaderExImpl.java:1058)
at org.apache.ignite.internal.processors.platform.utils.PlatformConfigurationUtils.readDataRegionConfiguration(PlatformConfigurationUtils.java:2303)
at org.apache.ignite.internal.processors.platform.utils.PlatformConfigurationUtils.readDataStorageConfiguration(PlatformConfigurationUtils.java:2082)
at org.apache.ignite.internal.processors.platform.utils.PlatformConfigurationUtils.readIgniteConfiguration(PlatformConfigurationUtils.java:919)
at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetConfigurationClosure.processPrepareResult(PlatformDotNetConfigurationClosure.java:195)
at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetConfigurationClosure.prepare(PlatformDotNetConfigurationClosure.java:182)
at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetConfigurationClosure.apply0(PlatformDotNetConfigurationClosure.java:110)
at org.apache.ignite.internal.processors.platform.PlatformAbstractConfigurationClosure.apply(PlatformAbstractConfigurationClosure.java:50)
at org.apache.ignite.internal.processors.platform.PlatformAbstractConfigurationClosure.apply(PlatformAbstractConfigurationClosure.java:27)
at org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:40)
at org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:74)
NOTE:This error only occuring in Apache Ignite 2.12.0 and code working fine in the previous versions.
An error like this happens due to a mismatch of .NET binaries and Java jar files.
Try deleting bin and obj directories and performing a clean rebuild.

Nhibernate Nunit Framework Exception

I get the error below when running my tests from command line. I use re-sharper for my test environment. When I run from VS2015, all the tests pass. But when I run them from command line using nunit framework the configuration setup fails. My current project is in .NET 4.6.2.
SetUp : System.TypeInitializationException : The type initializer for 'NHibernate.Cfg.Configuration' threw an exception.
System.TypeInitializationException : The type initializer for 'NHibernate.LoggerProvider' threw an exception.
System.ApplicationException : Unable to instantiate: NHibernate.Log4NetLoggerFactory
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
System.TypeInitializationException : The type initializer for 'NHibernate.Log4NetLoggerFactory' threw an exception.
System.NullReferenceException : Object reference not set to an instance of an object.
at NHibernate.Cfg.Configuration.Reset() in C:\Projects\nhibernate-core\src\NHibernate\Cfg\Configuration.cs:line 177
I encountered this issue when I upgraded from Nhibernate 2.0 to Nhibernate 4.0. I'm able to run the tests using version 2.0 dll of Nhibernate.
I have updated the test framework build file to run the tests on the latest nunit.framework.dll. (not the reference to the test project).

Ninject with WCF Application Error

In Visual Studio 2013, I've set up a WCF Application. My setup is exactly like the example posted at https://github.com/ninject/Ninject.Extensions.Wcf/tree/master/src/Examples. When I try to import my service reference from another project, I get the error below. I have have added Ninject.Extensions.Factory to the WCF project (and the referencing project) using Nuget, and still get the same error.
Warning 1 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load file or assembly 'Ninject.Extensions.Factory, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7' or one of its dependencies. The system cannot find the file specified.
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:portType[#name='IEnrollmentService'] C:\...\Reference.svcmap 1 1
When importing the Service Reference, click the Advanced button, then uncheck "reuse types in referenced assemblies".

Retrieving COM class factory ... failed error 80040154

I have an old VB.Net application using Interop.ebCryptLib.dll that I couldn't get to work. I get the following error:
Retrieving COM class factory for component with CLSID {...} failed due to the following error: 80040154
I've searched for the error online and tried the following:
Register the dll using regsvr32 but I get the error "entry point was not found"
I tried recompiling the project and set the platform to x86 but still get the same error.
Is there any other suggestion I can try? This is an old application developed by another person. I do have access to the code and am unable to get it to work properly.
Was able to resolve this by finding the original ebCrypt.dll online. Thanks for the help #HansPassant

Compiling error when generating moles for System.dll, System.Xml.dll in .NET4

There are compiling errors when generating moles for .NET4 System.dll (build 4.0.30310.261) and System.Xml.Dll(build 4.0.30319.233). The errors for System.Dll are:
m.g.cs(251449,33): error CS0115: 'System.Net.Moles.SFileWebResponse.Dispose(bool)': no suitable method found to override [c:\jin\moles\tmp\s\m.g.csproj]
m.g.cs(251650,30): error CS0115: 'System.Net.Moles.SFileWebResponse.SupportsHeaders': no suitable method found to override [c:\jin\moles\tmp\s\m.g.csproj]
m.g.cs(255339,33): error CS0115: 'System.Net.Moles.SHttpWebResponse.Dispose(bool)': no suitable method found to override [c:\jin\moles\tmp\s\m.g.csproj]
m.g.cs(255540,30): error CS0115: 'System.Net.Moles.SHttpWebResponse.SupportsHeaders': no suitable method found to override [c:\jin\moles\tmp\s\m.g.csproj]
m.g.cs(303198,33): error CS0115: 'System.Net.Moles.SWebResponse.Dispose(bool)': no suitable method found to override [c:\jin\moles\tmp\s\m.g.csproj]
m.g.cs(303399,30): error CS0115: 'System.Net.Moles.SWebResponse.SupportsHeaders': no suitable method found to override [c:\jin\moles\tmp\s\m.g.csproj]
Done Building Project "c:\jin\moles\tmp\s\m.g.csproj" (default targets) -- FAILED.
The errors for System.Xml.Dll are:
m.g.cs(113977,17): error CS0205: Cannot call an abstract base member: 'System.Xml.XmlReader.Close()' [c:\jin\moles\tmp\s\m.g.csproj]
m.g.cs(116149,21): error CS0205: Cannot call an abstract base member: 'System.Xml.XmlResolver.Credentials.set' [c:\jin\moles\tmp\s\m.g.csproj]
m.g.cs(130559,17): error CS0205: Cannot call an abstract base member: 'System.Xml.XmlWriter.Close()' [c:\jin\moles\tmp\s\m.g.csproj]
I'm using Moles 0.94 with VS2010. The errors only happen for newer version of the two DLLs, after .NET 4 service pack is installed. Moles are generated fine for version 4.0.30319.1 of the two DLL, before .NET 4 service packs.
It seems the code generated by Moles is not compatible with latest .NET4 assemblies.
See these questions:
Moling System.dll
http://social.msdn.microsoft.com/Forums/en/pex/thread/446669dd-1d69-4020-9174-dc259a55b4b4
Basically, update System.moles as follows:
<Moles xmlns="http://schemas.microsoft.com/moles/2010/">
<Assembly Name="System" ReflectionOnly="true"/>
</Moles>