Why is my solution built with the wrong dll version?

I am using Microsoft.SQLServer.Types to use a spatial type. I am installing version 11.x from Nuget.

When I publish the solution using Visual studio (2013), it copies version 11.x to the bin folder.

However, when I use MSBuild, it copies version 10.x to the bin folder.

Any thoughts why?

Here's the csproj file bit that references the dll:

<Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
    <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.1\lib\net20\Microsoft.SqlServer.Types.dll</HintPath>
</Reference>

In addition, the local copy is set to true.

I also got this in the web.config file for this project:

<dependentAssembly>
    <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
</dependentAssembly>
+4
source share

Source: https://habr.com/ru/post/1538397/


All Articles