voult2 / BetterPawnControl

A RimWorld mod that allows bulk assignment of animals to zones and colonists to outfits (or drugs) in one single action
MIT License
20 stars 21 forks source link

Stop updating AssemblyVersion #7

Closed alextd closed 5 years ago

alextd commented 5 years ago

TL;DR you don't need to update AssemblyVersion in AssemblyInfo.cs, only AssemblyFileVersion

Since my mod Gear Up And Go references the BetterPawnControl dll, it's bound to the AssemblyVersion, so every update of AssemblyVersion means compatibility is broken.

This took a while to figure out why but I'm just listing what I found now:

"Two assemblies that differ by version number are considered by the runtime to be completely different assemblies" - https://docs.microsoft.com/en-us/dotnet/framework/app-domains/assembly-versioning

"If this number changes, other assemblies have to update their references to your assembly" "AssemblyFileVersion: Used for deployment. You can increase this number for every deployment" https://stackoverflow.com/questions/64602/what-are-differences-between-assemblyversion-assemblyfileversion-and-assemblyin

voult2 commented 5 years ago

I update the AssemblyVersion to allow Mod Update News to detect the new version --> https://github.com/UnlimitedHugs/RimworldHugsLib/wiki/Mod-Update-News

I didn't know this broke Gear Up And Go. However, I can also use overrideVersion field in the Version.xml. I will do this next time!

Thanks for the heads up!

alextd commented 5 years ago

Good stuff

/The more you know/