1

I am pulling this project from a git repository that depends on Microsoft.SqlServer.Types which should install msvce120.dll and SqlServerSpatial140.dll. But for some reason it does not install them. They appear in the solution explorer as seen on the image. But the files are not there in windows explorer.

The project was cloned from a git repository. As soon as I tried to build the project, VS started downloading the necessary nuget packages, but this files fail to download. The original repository has these files marked as git ignored.

enter image description here

Where am I going wrong here? I could simply copy and paste the dlls from the original repository but I want to understand why they are not being downloaded or installed.

Ben Quan
  • 773
  • 11
  • 25
  • Its **not** a duplicate but I thought I'd had a similar issue, this was it: https://stackoverflow.com/questions/26837081/could-not-load-microsoft-sqlserver-types-10-but-version-11-is-referenced – Jeremy Thompson Jan 17 '18 at 04:49
  • Did you ever figure out a solution to this issue? I'm trying to correct a git repo so that new clones wont have to remove and re-add the nuget package in order to get these files – Doc Mar 28 '18 at 19:32

1 Answers1

4

If you installed this package into a project using the <PackageReference> style of packages (typically found in .Net Standard / .Net Core applications), then the files are not added because there is a lack of support for the install / uninstall scripts used for this function.

Specifically, when installing / restoring this package, there is an install.ps1 script that is supposed to be ran which creates the folders and places the dll's you're referencing into these folders. Again, there is no support for this functionality in the <PackageReference> style of packaging.

This is juxtapose to the packaging style that uses Packages.config which DOES have support for install / uninstall scripts.

You can read more about this here: https://github.com/NuGet/Home/issues/6330

Ryan Griffith
  • 1,591
  • 17
  • 41
  • I've got a similar problem also involving Microsoft.SqlServer.Types. But we're not using `` style of packages. We're using the older style. We're using .NET 4.5.2. We're also using Microsoft.SqlServer.Types version 12.0.5000. – Rod Jul 14 '21 at 20:48