[Ironpython-users] Changing the version information of ironpython .dll assembly

2016-02-15 Thread Didier Bernard
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
[email protected]
https://mail.python.org/mailman/listinfo/ironpython-users


Re: [Ironpython-users] Changing the version information of ironpython .dll assembly

2016-02-15 Thread Andrew Graham
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: [email protected] 
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
[email protected]
https://mail.python.org/mailman/listinfo/ironpython-users
___
Ironpython-users mailing list
[email protected]
https://mail.python.org/mailman/listinfo/ironpython-users


Re: [Ironpython-users] Changing the version information of ironpython .dll assembly

2016-02-15 Thread Slide
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  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:* [email protected]
> *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
> [email protected]
> https://mail.python.org/mailman/listinfo/ironpython-users
> ___
> Ironpython-users mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/ironpython-users
>
___
Ironpython-users mailing list
[email protected]
https://mail.python.org/mailman/listinfo/ironpython-users


Re: [Ironpython-users] Changing the version information of ironpython .dll assembly

2016-02-15 Thread Didier Bernard
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

This is the error message I got:

An exception occurred during merging:
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 
Sent: Monday, February 15, 2016 8:53 PM
To: Andrew Graham; Didier Bernard; [email protected]
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 
mailto:[email protected]>> 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: [email protected]
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
[email protected]
https://mail.python.org/mailman/listinfo/ironpython-users

___
Ironpython-users mailing list
[email protected]
https://mail.python.org/mailman/listinfo/ironpython-users
___
Ironpython-users mailing

Re: [Ironpython-users] Changing the version information of ironpython .dll assembly

2016-02-15 Thread Slide
Grab the source from github.com/IronLanguages/main.git and compile the
ironpython solution.

On Mon, Feb 15, 2016, 14:59 Didier Bernard 
wrote:

> 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
>
> This is the error message I got:
>
> An exception occurred during merging:
> 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 
> *Sent:* Monday, February 15, 2016 8:53 PM
> *To:* Andrew Graham; Didier Bernard; [email protected]
> *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 
> 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:* [email protected]
>> *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
>> [email protected]
>> https://mail.python.

Re: [Ironpython-users] Changing the version information of ironpython .dll assembly

2016-02-15 Thread Didier Bernard
quote:

"Grab the source from 
github.com/IronLanguages/main.git and 
compile the ironpython solution."

Thank you Slide.

I have never done that, so I do not know how to do it.

I am not a programmer.


From: Slide 
Sent: Monday, February 15, 2016 11:10 PM
To: Didier Bernard; [email protected]; [email protected]
Subject: Re: [Ironpython-users] Changing the version information of ironpython 
.dll assembly


Grab the source from 
github.com/IronLanguages/main.git and 
compile the ironpython solution.

On Mon, Feb 15, 2016, 14:59 Didier Bernard 
mailto:[email protected]>> wrote:

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

This is the error message I got:

An exception occurred during merging:
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 mailto:[email protected]>>
Sent: Monday, February 15, 2016 8:53 PM
To: Andrew Graham; Didier Bernard; 
[email protected]
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 
mailto:[email protected]>> 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: [email protected]
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

Re: [Ironpython-users] Changing the version information of ironpython .dll assembly

2016-02-15 Thread Markus Schaber
Hi, Didier,

Just in case the problem cannot be solved here:

You could use some post-processing using libraries like IKVM.Reflection or 
Mono.Cecil to change the version afterwards, working around the problem.

Best regards

Markus Schaber

CODESYS® a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions

3S-Smart Software Solutions GmbH
Dipl.-Inf. Markus Schaber | Product Development Core Technology
Memminger Str. 151 | 87439 Kempten | Germany
Tel. +49-831-54031-979 | Fax +49-831-54031-50

E-Mail: [email protected] | Web: 
codesys.com | CODESYS store: 
store.codesys.com
CODESYS forum: forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received
this e-mail in error) please notify the sender immediately and destroy this 
e-mail. Any unauthorised copying, disclosure
or distribution of the material in this e-mail is strictly forbidden.
From: Ironpython-users 
[mailto:[email protected]] On Behalf Of 
Didier Bernard
Sent: Monday, February 15, 2016 5:42 PM
To: [email protected]
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
[email protected]
https://mail.python.org/mailman/listinfo/ironpython-users