2

I have TeamCity (v9) and NuGet (2.83). My NuGet package is a C++ static lib and is of type 'Native'.

I am running, through TeamCity, a NuGet Installer build step that I would like to update the native (C++ Static lib) project in question to use the latest version of the NuGet package.

I get this warning: [15:41:59][update] WARNING: Could not install package 'MyPackage 1.0.0.7-unstable'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Although it's just a warning, it causes the package to be removed totally, so the build fails to compile. So a problem.

As the warning says, my C++ project file does not reference a .Net framework. Neither does any code in my package. It's C++ v11 code.

This warning is produced when updating via NuGet outside of Visual Studio, so that includes TeamCity. Doing it manually through VS works fine. Also an install (through anything) of the latest version works fine.

I am guessing the issue is that NuGet is wrongly testing the native NuGet package for .Net references?

Does anyone know how I can either add a reference to my native NuGet package so this warning can be resolved. Or does anyone know how to automatically update a Natice NuGet package in a C++ static library project?

Thanks in advance.

SteveChapman
  • 3,051
  • 1
  • 22
  • 37
TinyRacoon
  • 4,655
  • 2
  • 23
  • 22

0 Answers0