Failed to compile on Visual Studio 2019

Hi All,

I'm trying to compile on Visual Studio 2019, Windows 10, and getting the following error:

Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. 

The missing file is packages\libpng.redist.1.6.28.1\build\native\libpng.redist.targets.

I tried:

  1. Selecting both options under "Package Restore" (as suggested by Microsoft)
  2. Uninstalling, installing libpng (and all packages with libpng)
  3. Deleting the package folder and making a copy under /src, /src/debug folder

Any help will be appreciated.

Thanks,

Joanne

Comments

  • Joanne,


    I deleted my packages folder and was able to re-create your issue. Try this:

    1. In VS2019 go to the "Project" menu and select "Manage Nuget packages"
    2. When the window "NuGet: TinyCad" comes up, at the top of the window it says something like "Some NuGet packages are missing from this solution. Click to restore from your online package sources,"
    3. Click the button "Restore" to the far right of the warning.

    It VS2019 should then install all the missing packages and you should then be able to go-ahead and compile.


    Thanks,

    Matt.

  • Hi Matt,

    I have the same problem as Joanne and tried the procedure as per your suggestion but it still has the same error message "The missing file is packages\libpng.redist.1.6.28.1\build\native\libpng.redist.targets." Note that this file is clearly shown in the .\packages folder.

    I tried copying the .\packages folder to .\src\packages, VS2019 was able to compile the source file but could not build because of missing "GIT_BRANCH" declaration from BuildID.h. It also complains about redefinition of "BUILD_UUID".

    I tried the following with success.

    1. Use powershell to set-executionpolicy unrestricted
    2. Create an empty folder, use VS2019 "Clone or check out code" to download TinyCAD into this folder.
    3. After building the git packages, VS2019 still could not build the project.
    4. After copying .\packages to .\src\packages, VS2019 is able to build the project.

    Matt, thanks for the good work you have done for TinyCAD, much appreciated.

    Ken

  • Ken,

    Thanks for the feedback. I am not entirely sure what the problem is with the nuget packages, but I am glad you got it to work.

    I will make a note about the GIT_BRANCH in the build instructions, I forgot about that one!

    Thanks,

    Matt.

  • Ken and Matt,

    I tried Ken's method (omitting step 1) and am able to build the project successfully. Thank you both for your suggestions.

    Best,

    Joanne

Sign In or Register to comment.