xsharp.eu • Version and dependencies
Page 1 of 1

Version and dependencies

Posted: Sat Nov 09, 2019 10:15 am
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

Version and dependencies

Posted: Sat Nov 09, 2019 12:00 pm
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

Version and dependencies

Posted: Sat Nov 09, 2019 2:33 pm
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