Process is terminated due to StackOverflowException

I’m afraid that I have no idea how to solve that one. It looks like something 
in your dll is making ILMerge loop endlessly. I’ve used ILMerge in anger a 
couple of times in the past and it has just worked for me so I’ve no experience 
of troubleshooting it.

Andy Graham



From: Didier Bernard 
Sent: Tuesday, February 16, 2016 10:08 AM
To: Andrew Graham ; ironpython-users@python.org 
Subject: Re: [Ironpython-users] Changing the version information of ironpython 
.dll assembly

Thank you Andrew.

I am not a programmer so sometimes obvious things to try are not really 
something I know how to do.

Yes, I installed my IronPython 2.7 from .msi.

I changed the location of the pythonDll.dll file. I copied it into the 
IronPython installation folder, like so:

  C:\>"D:\Program Files\Microsoft\ILMerge\ILMerge.exe" "C:\Program 
Files\IronPytho
  n 2.7\pythonDll.dll" /ver:1.2.3.4 /out:"C:\Program Files\IronPython 
2.7\pythonDl
  l2.dll"

Now the previous error message disappeared. This one:


  Unresolved assembly reference not allowed: IronPython.

But a new error message appeared:

  An exception occurred during merging:
  Unresolved assembly reference not allowed: System.Core.
     at System.Compiler.Ir2md.GetAssemblyRefIndex(AssemblyNode assembly)
     at System.Compiler.Ir2md.GetTypeRefIndex(TypeNode type)
     at System.Compiler.Ir2md.WriteTypeRefEncoded(BinaryWriter target, TypeNode 
ty
  pe)
     at System.Compiler.Ir2md.WriteTypeDefOrRefEncoded(BinaryWriter target, 
TypeNo
  de type)
     at System.Compiler.Ir2md.WriteTypeSignature(BinaryWriter target, TypeNode 
typ
  e, Boolean instantiateGenericTypes)
     at System.Compiler.Ir2md.WriteTypeSignature(BinaryWriter target, TypeNode 
typ
  e, Boolean instantiateGenericTypes)
     at System.Compiler.Ir2md.GetBlobIndex(TypeNode type)
     at System.Compiler.Ir2md.GetTypeSpecIndex(TypeNode type)
     at System.Compiler.Ir2md.VisitReferencedType(TypeNode type)
     at System.Compiler.Ir2md.GetMemberRefIndex(Member m)
     at System.Compiler.Ir2md.GetMethodToken(Method m)
     at System.Compiler.Ir2md.VisitConstruct(Construct cons)
     at System.Compiler.Ir2md.Visit(Node node)
     at System.Compiler.Ir2md.VisitExpressionStatement(ExpressionStatement 
stateme
  nt)
     at System.Compiler.Ir2md.Visit(Node node)
     at System.Compiler.Ir2md.VisitBlock(Block block)
     at System.Compiler.Ir2md.Visit(Node node)
     at System.Compiler.Ir2md.VisitBlock(Block block)
     at System.Compiler.Ir2md.VisitMethodBody(Method method)
     at System.Compiler.Ir2md.VisitMethod(Method method)
     at System.Compiler.Ir2md.Visit(Node node)
     at System.Compiler.Ir2md.VisitClass(Class Class)
     at System.Compiler.Ir2md.Visit(Node node)
     at System.Compiler.Ir2md.VisitModule(Module module)
     at System.Compiler.Ir2md.SetupMetadataWriter(String debugSymbolsLocation)
     at System.Compiler.Ir2md.WritePE(Module module, String 
debugSymbolsLocation,
  BinaryWriter writer)
     at System.Compiler.Writer.WritePE(String location, Boolean 
writeDebugSymbols,
  Module module, Boolean delaySign, String keyFileName, String keyName)
     at System.Compiler.Writer.WritePE(CompilerParameters compilerParameters, 
Modu
  le module)
     at System.Compiler.Module.WriteModule(String location, CompilerParameters 
opt
  ions)
     at ILMerging.ILMerge.Merge()
     at ILMerging.ILMerge.Main(String[] args)

I tried googling, and found this topic which describes the same error message: 
http://stevemichelotti.com/ilmerge-unresolved-assembly-reference-not-allowed-system/

Indeed I have the same .NET version, like in that topic: 4.0.30319

I created the ILMerge.exe.config file in the same folder where ILMerge.exe is:

  <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
          <requiredRuntime safemode="true" imageVersion="v4.0.30319" 
version="v4.0.30319"/>
      </startup>
  </configuration>

Now when I run the ILMerge.exe from the command line, the following error 
message appears:

  Process is terminated due to StackOverflowException

Any suggestions on what to do?


Thank you.
Didier.







--------------------------------------------------------------------------------

From: Andrew Graham <a...@agraham.demon.co.uk>
Sent: Tuesday, February 16, 2016 10:02 AM
To: Didier Bernard; ironpython-users@python.org
Subject: Re: [Ironpython-users] Changing the version information of ironpython 
.dll assembly 

This is the error message I got:
An exception occurred during merging:

I always try something before suggesting it and it worked fine for me when I 
tried it on a dll I made with clr.CompileModules. Are your IronPython dlls in 
the GAC? i.e is IronPython installed from the msi? The only thing I can think 
of is that IronPython.dll is not accessible for some reason.

Andy Graham

From: Didier Bernard 
Sent: Monday, February 15, 2016 9:59 PM
To: Slide ; a...@agraham.demon.co.uk ; ironpython-users@python.org 
Subject: Re: [Ironpython-users] Changing the version information of ironpython 
.dll assembly

Thank you for the replies both Andy and Slide.



@ Slide:



I am currently bound to use ironpython 2.7.

Can you provide a link or an explanation for this part please:



       "You could also compile from the 2.7 mainy branch and get it from there. 
Ipyc replaces pyc.py."





@ Andy Graham:

I downloaded the ILMerge utility v2.12.0803 and tried to use the same syntax 
you gave me:

C:\>"D:\Program Files\Microsoft\ILMerge\ILMe

rge.exe" D:\dlls\pythonDll.dll /ver:1.2.3.4 /out:D:\dlls\pythonDll2.dll


Unresolved assembly reference not allowed: IronPython.
   at System.Compiler.Ir2md.GetAssemblyRefIndex(AssemblyNode assembly)
   at System.Compiler.Ir2md.GetTypeRefIndex(TypeNode type)
   at System.Compiler.Ir2md.VisitReferencedType(TypeNode type)
   at System.Compiler.Ir2md.VisitMethod(Method method)
   at System.Compiler.Ir2md.Visit(Node node)
   at System.Compiler.Ir2md.VisitClass(Class Class)
   at System.Compiler.Ir2md.Visit(Node node)
   at System.Compiler.Ir2md.VisitModule(Module module)
   at System.Compiler.Ir2md.SetupMetadataWriter(String debugSymbolsLocation)
   at System.Compiler.Ir2md.WritePE(Module module, String debugSymbolsLocation,
BinaryWriter writer)
   at System.Compiler.Writer.WritePE(String location, Boolean writeDebugSymbols,
Module module, Boolean delaySign, String keyFileName, String keyName)
   at System.Compiler.Writer.WritePE(CompilerParameters compilerParameters, Modu
le module)
   at System.Compiler.Module.WriteModule(String location, CompilerParameters opt
ions)
   at ILMerging.ILMerge.Merge()
   at ILMerging.ILMerge.Main(String[] args)




Thank you.

Kind regards,
Didier




--------------------------------------------------------------------------------

From: Slide <slide.o....@gmail.com>
Sent: Monday, February 15, 2016 8:53 PM
To: Andrew Graham; Didier Bernard; ironpython-users@python.org
Subject: Re: [Ironpython-users] Changing the version information of ironpython 
.dll assembly 

You can do this now with ipyc, which should be in the next version. It allows 
you to set many more things than pyc.py. You could also compile from the 2.7 
mainy branch and get it from there. Ipyc replaces pyc.py.

Thanks 

Slide



On Mon, Feb 15, 2016, 10:11 Andrew Graham <a...@agraham.demon.co.uk> wrote:

You can use ilmerge to change it after compilation
http://stackoverflow.com/questions/398170/change-assembly-version-in-a-compiled-net-assembly

ilmerge mycode.dll /ver:1.2.3.4 /out:mycode.dll

ILMerge is available via NuGet in Visual Studio or from the Microsoft Download 
center

http://www.microsoft.com/en-gb/download/details.aspx?id=17630



Last time I looked the 

version on NuGet is 2.14.1208 while the download is the earlier version 
2.12.0803. 

Andy Graham


From: Didier Bernard 
Sent: Saturday, February 13, 2016 10:36 PM
To: ironpython-users@python.org 
Subject: [Ironpython-users] Changing the version information of ironpython .dll 
assembly

Hello,

I have the following issue with ironpython 2.7: I would like to compiles the 
.py file to .dll. Here is a nice example on how this can be done with 
clr.CompileModules method.
The problem is that the File Version of the compiled .dll is always: 0.0.0.0.

How can I change that?
I posted a question about this issue on stackoverflow.com. Even there there 
stands that the issue is solved, it isn't. the person who tried to help me (D. 
Alveno) really gave a lot of effort to do that. So this is why I marked his 
answer as the solving one. But in reality the issue is still not solved.

D. Alveno suggested using ipy.exe pyc.py instead of clr.CompileModules method. 
In the end this again resulted in getting a .dll file with File Version: 
0.0.0.0.

I also tried a couple of other methods (those three ones mentioned on 
stackoverflow.com), but all of them failed, as they do not seem to be made for 
ironpython .dll assemblies, but probably C# and VB.NET.

I would welcome any kind of advice.

Thank you in advance.

With kind regards,
Didier Bernard



--------------------------------------------------------------------------------
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users

_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to