-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DnsClient.DnsResponseException: Unhandled exception (FileNotFoundException: System.Buffers, Version=4.0.2.0) in .NET Framework 4.7.2 #59
Comments
4.0.2.0 is the internal assembly version of System.Buffers of the Nuget version 4.4.0 Is your app an using the old (before .NET Core) project system? Then you might need a proper assembly redirect in your app/web.config. There are also a bunch of issues related to those kind of errors and .NET 4.7.2 on the dotnet/runtime and dotnet/standard github repository. Maybe you check that out, too. |
All right. I'll take a look. This is for a library I've built for my internal desktop applications, so there isn't a |
If you cannot figure it out, try to reproduce it in a simple project or let me know what exactly you use. VS version, project / solution type.. |
Well, crap. I downgraded the System.Buffers version to 4.4.0 and ran a quick debug test where I got a couple of additional warnings from some of the other assemblies I use (like Npgsql), so I brought it back up to 4.5.0 and tried to generate the exception so I could populate the redirect element in the app.config. This time, I didn't see any exceptions from DnsClient. Perhaps something just needed to be "refreshed" somewhere... IDK. EDIT: Going and looking at the app.config, I see that there's apparently already a redirection entry for System.Buffers that specifies all old/current versions point to 4.0.3.0... Maybe that's where the problem was all along (I didn't look at it before I downgraded). Again, I'm not sure, but I'm going to basically have to assume that all is well now. <dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly> |
im getting this same issue ... when i upgraded to 4.7.2 or 4.8, and dnsclient >1.3.0 .. I'll try to get a reproduction example |
I'm using the most recent NuGet package available for DnsClient (v1.2.0), which states in its dependencies that it uses System.Buffers >= 4.4.0 under the .NET Framework 4.7.1. I also have the current NuGet package for System.Buffers (4.5.0) installed in the project, however my application has been raising the above exception when it attempts to execute
DnsClient.LookupClient.Query("domainname", DnsClient.QueryType.MX)
I realize that I'm using a slightly newer version of the .NET Framework (4.7.2 instead of 4.7.1) and that this could be the source of the issue. Also, I don't have the debugger set to break on these exceptions, so it is able to continue execution without too much headache, but I'm just wondering why it appears to be looking for the much older version 4.0.2.0 of the System.Buffers library instead of at least 4.4.0.
I'm using this in an e-mail address validation method, and the problem is that the exception causes pretty much every e-mail address I test to come back as invalid since it won't retrieve the MX record for the domain.
The text was updated successfully, but these errors were encountered: