maxmind/GeoIP2-dotnet

Max Mind GeoIP2 0.3.0.0 only deploys through MSBuild with Rest Sharp version 104.3.3

longda opened this issue · 5 comments

Not sure if this is a bug but if you're using a new version of RestSharp it will not deploy correctly using MSBuild, either via the command or through the Publish feature inside Visual Studio.

Steps to recreate.

  1. Install the latest version of RestSharp, should be something like 104.4.0 but anything greater than 104.3.3 via Nuget.
  2. Install MaxMind GeoIP2 via Nuget.
  3. Use MSBuild from command line or the "Publish..." feature inside Visual Studio and the RestSharp.dll will not be packaged as part of the output. This can be confirmed via the build output window inside Visual Studio with the "diagnostic" level set:

1> ResolveAssemblyReference: Could not resolve this reference. Could not locate the assembly "RestSharp, Version=104.3.3.0, Culture=neutral, PublicKeyToken=null". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

Result: Examine the bin folder of your output and note that the RestSharp.dll is not there.
Expected result: RestSharp.dll should be in the bin.
Humble Suggestion Rather than have the dependency of RestSharp >= 104.3 in your nuget package file, make it a specific version requirement: RestSharp == 104.3.3 since that is what MSBuild will look for.
Note: Not sure, but this might be an issue on Microsoft's side (either MSBuild or Nuget).
Workaround:

PM> Install-Package RestSharp -Version 104.3.3

I have a sample test project that can be provided, if necessary.

Hmm, I haven't seen this issue myself. Your sample project would be useful in debugging this.

Thanks! I'll take a look at this.

I pushed out 0.3.1, which may have fixed this.

I believe this was fixed in 0.3.1. If not, please let me know, and I can reopen the issue.