Closed Euphoric closed 6 years ago
I did some research around Nerdbank.GitVersioning and found two possible solutions.
First is to increase precision of assembly version in version.json like
"assemblyVersion": {
"precision": "build"
},
Second option is to always increase minor version for new release. So next NuGet should be 0.1 not 0.0
@onovotny You were the one who implemented this, how should this situation be handled?
Also, it would be great if next release was made soon and 0.0.43 package marked as not-to-be-used. So the version problems don't spread around.
It's not missing the numbers, they are set to 0.0 currently. That is controlled by setting it in the version.json file.
Sent from a mobile device, please excuse brevity and typos
From: Euphoric notifications@github.com Sent: Thursday, February 8, 2018 4:25:10 AM To: benaadams/Ben.Demystifier Cc: Oren Novotny; Mention Subject: Re: [benaadams/Ben.Demystifier] Assembly version is missing build and revision numbers (#53)
Also, it would be great if next release was made soon and 0.0.43 package marked as not-to-be-used. So the version problems don't spread around.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbenaadams%2FBen.Demystifier%2Fissues%2F53%23issuecomment-364051637&data=02%7C01%7Coren%40novotny.org%7C92262b7cfdeb425548c908d56ed5da6c%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636536787154131300&sdata=RsVNNVhi2IfhtjjexTK5tvqE0eV98J3yV%2Bwl8NTElDs%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABXHVCdHManV3Vr0E9tm4zdyLwxP6utuks5tSr12gaJpZM4R9_QR&data=02%7C01%7Coren%40novotny.org%7C92262b7cfdeb425548c908d56ed5da6c%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636536787154131300&sdata=rG7pUZh%2BUc5HAK0jdDIIckWlCkfuCqLHn%2BV7a4c5pmk%3D&reserved=0.
Thanks @onovotny for clarifying. But that is not the problem. The problem is that previous NuGet package 0.0.8.0 has assembly version 0.0.8.0. And next version 0.0.43.0 has version 0.0.0.0 . So if a 3rd party library depends on 0.0.8.0 , but 0.0.43.0 is installed, then .NET thinks old version is present based on assembly version and fails with exception.
Either increase precision of assembly version to include at least build number , or make sure to always increase minor version when releasing new NuGet package.
Prob should release a 0.1
0.0.43.0 us a higher version than 0.0.8. The issue is normal binding redirects than desktop.net requires. They sound be automatically added by msbuild though.
You'll hit this no matter what version you use since it requires an exact match without the redirect.
Sent from a mobile device, please excuse brevity and typos
From: Ben Adams notifications@github.com Sent: Thursday, February 8, 2018 9:15:38 AM To: benaadams/Ben.Demystifier Cc: Oren Novotny; Mention Subject: Re: [benaadams/Ben.Demystifier] Assembly version is missing build and revision numbers (#53)
Prob should release a 0.1
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbenaadams%2FBen.Demystifier%2Fissues%2F53%23issuecomment-364123955&data=02%7C01%7Coren%40novotny.org%7C5ec0c88ec2e548f7df2108d56efe7023%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636536961451314463&sdata=HfQXzOsPoX3h7GKC9qU2td6%2BYiz%2BFaQd0LvR3s7XXyQ%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABXHVMDwx1lux_Z84HV9wAFcYYwcU0a9ks5tSwGKgaJpZM4R9_QR&data=02%7C01%7Coren%40novotny.org%7C5ec0c88ec2e548f7df2108d56efe7023%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636536961451314463&sdata=iQTah0loh9zNVSc0nEN3iV43i0p8L3i6Yh7m%2FU%2BOLvs%3D&reserved=0.
@onovotny That is not true. 0.0.43 is higher NuGet version but it is not higher Assembly version.
Here is sample project BenDemystifyTest.zip
It has codeessentials.Extensions.Logging.Demystifier installed. This is built against 0.0.4.0 , but 0.0.8.0 is installed and it works. But after upgrading to 0.0.43 , the exception I posted in top comment is thrown. So it is not exact match and no redirect is needed. But only if Assembly version is greater than 0.0.4.0, which it isn't for 0.0.43 NuGet package.
That's because it wasn't strong named.
Sent from a mobile device, please excuse brevity and typos
From: Euphoric notifications@github.com Sent: Thursday, February 8, 2018 10:33:55 AM To: benaadams/Ben.Demystifier Cc: Oren Novotny; Mention Subject: Re: [benaadams/Ben.Demystifier] Assembly version is missing build and revision numbers (#53)
@onovotnyhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fonovotny&data=02%7C01%7Coren%40novotny.org%7Cd069bab2d70e4c9aef2e08d56f095da4%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636537008421376549&sdata=gjaqXyY0h%2F304%2Fq4k2s%2BJmFYhpYwu8VkF%2FcfMDkaOgU%3D&reserved=0 That is not true. Here is sample project BenDemystifyTest.ziphttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbenaadams%2FBen.Demystifier%2Ffiles%2F1707658%2FBenDemystifyTest.zip&data=02%7C01%7Coren%40novotny.org%7Cd069bab2d70e4c9aef2e08d56f095da4%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636537008421376549&sdata=HyhGbYpPvmRfD1MULAQZ9vcYcnDFT9KBAvWXhC6rF58%3D&reserved=0
It has codeessentials.Extensions.Logging.Demystifier installed. This is built against 0.0.4.0 , but 0.0.8.0 is installed and it works. But after upgrading to 0.0.43 , the above exception is thrown. So it is not exact match and no redirect is needed. But only if Assembly version is greater than 0.0.4.0, which it isn't for 0.0.43 NuGet package.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbenaadams%2FBen.Demystifier%2Fissues%2F53%23issuecomment-364148873&data=02%7C01%7Coren%40novotny.org%7Cd069bab2d70e4c9aef2e08d56f095da4%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636537008421376549&sdata=AX9s23uVVqzzFQdwZhlC41LFHNS6DhCzeScqMyaAXlk%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABXHVJ87HBebi3ZEzNiXWU_LqiWg2Wp8ks5tSxPjgaJpZM4R9_QR&data=02%7C01%7Coren%40novotny.org%7Cd069bab2d70e4c9aef2e08d56f095da4%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636537008421376549&sdata=%2BKuwdXEHHL9xUHXLbi8y1h7fCZeE9IHQfrz3S%2FzJMnc%3D&reserved=0.
Strong naming is a breaking change, so you'd need to recompile once with the latest version. Before it wasn't strong named.
Sent from a mobile device, please excuse brevity and typos
From: Oren Novotny Sent: Thursday, February 8, 2018 10:38:59 AM To: benaadams/Ben.Demystifier; benaadams/Ben.Demystifier Cc: Mention Subject: Re: [benaadams/Ben.Demystifier] Assembly version is missing build and revision numbers (#53)
That's because it wasn't strong named.
Sent from a mobile device, please excuse brevity and typos
From: Euphoric notifications@github.com Sent: Thursday, February 8, 2018 10:33:55 AM To: benaadams/Ben.Demystifier Cc: Oren Novotny; Mention Subject: Re: [benaadams/Ben.Demystifier] Assembly version is missing build and revision numbers (#53)
@onovotnyhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fonovotny&data=02%7C01%7Coren%40novotny.org%7Cd069bab2d70e4c9aef2e08d56f095da4%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636537008421376549&sdata=gjaqXyY0h%2F304%2Fq4k2s%2BJmFYhpYwu8VkF%2FcfMDkaOgU%3D&reserved=0 That is not true. Here is sample project BenDemystifyTest.ziphttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbenaadams%2FBen.Demystifier%2Ffiles%2F1707658%2FBenDemystifyTest.zip&data=02%7C01%7Coren%40novotny.org%7Cd069bab2d70e4c9aef2e08d56f095da4%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636537008421376549&sdata=HyhGbYpPvmRfD1MULAQZ9vcYcnDFT9KBAvWXhC6rF58%3D&reserved=0
It has codeessentials.Extensions.Logging.Demystifier installed. This is built against 0.0.4.0 , but 0.0.8.0 is installed and it works. But after upgrading to 0.0.43 , the above exception is thrown. So it is not exact match and no redirect is needed. But only if Assembly version is greater than 0.0.4.0, which it isn't for 0.0.43 NuGet package.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbenaadams%2FBen.Demystifier%2Fissues%2F53%23issuecomment-364148873&data=02%7C01%7Coren%40novotny.org%7Cd069bab2d70e4c9aef2e08d56f095da4%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636537008421376549&sdata=AX9s23uVVqzzFQdwZhlC41LFHNS6DhCzeScqMyaAXlk%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABXHVJ87HBebi3ZEzNiXWU_LqiWg2Wp8ks5tSxPjgaJpZM4R9_QR&data=02%7C01%7Coren%40novotny.org%7Cd069bab2d70e4c9aef2e08d56f095da4%7Cd1c4ebc6828f4a898786cfbe1f4e8c94%7C0%7C0%7C636537008421376549&sdata=%2BKuwdXEHHL9xUHXLbi8y1h7fCZeE9IHQfrz3S%2FzJMnc%3D&reserved=0.
Submitted updates to various projects https://github.com/nblumhardt/serilog-enrichers-demystify/pull/6, https://github.com/MNie/Log4Net.Demystifier/pull/1, https://github.com/twenzel/Demystify.Everything/pull/6 (codeessentials)
Should be resolved
My issue #87 may be related.
Version 0.0.43 is missing assembly version. When this assembly is references in csproj, it shows as
Version 0.0.8 shows as
While this is not a problem by itself. It does cause breakage in any libraries that depend on Ben.Demystifier.
For example, if codeessentials.Extensions.Logging.Demystifier is installed, it works fine with 0.0.8 ,but loading exception is thrown for 0.0.43 :
Could not load file or assembly 'Ben.Demystifier, Version=0.0.4.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)