Version and dependencies

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Version and dependencies

Post by wriedmann »

Hello,

afaik the version in the AssemblyInfo defines also the dependencies.
So if my exe references a library with a version like

Code: Select all

[assembly: AssemblyVersionAttribute( "1.0.0.5" )]
the exe runs only when a library with the same AssemblyVersionAttribute is present in the application folder or the GAC.
Is there any possibility to use the same exe also with a library with a higher version?
Are there any rules what works and what not?
Thank you very much!
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Version and dependencies

Post by robert »

Wolfgang,
You need to include a config file with your app. Have a look at "c:Program Files (x86)XSharpBinxsc.exe.config" for an example.
In this file you can specify "assemblyBinding" information, like this:
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
</dependentAssembly>
Google will help you to explain what this all means.
To automatically generate this you can include the project property
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
to your xsproj file.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Version and dependencies

Post by wriedmann »

Hi Robert,
thank you very much!
I will look at this. It will become important when I start to distribute X# applications to more customers - at the moment we are using X# applications in production only for single customer projects, but I have started one now that will be selled to more different customers (hopefully).
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Post Reply