vs 2015 .net 4.6 nuget package missing

corey's Avatar


07 Aug, 2015 06:58 PM

I'm using the Visual Studio 2015 OS selection and I've added the path to the MSBuild v 14.0 but I still can't figure out this issue.

C:\projects\urdb-home\rs4\rs4.csproj(3293,5): error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props

I've read as many other related threads as I could find, but I still can't quite solve my issue. I'm on a basic paid plan using a private repo.

  1. Support Staff 1 Posted by Feodor Fitsner on 07 Aug, 2015 07:05 PM

    Feodor Fitsner's Avatar

    Do you run nuget restore?

  2. 2 Posted by corey on 07 Aug, 2015 07:42 PM

    corey's Avatar

    I cannot for the life of me figure out how in Visual Studio 2015. (We have an upgraded project from VS 2013 if that is helpful info)

  3. Support Staff 3 Posted by Feodor Fitsner on 07 Aug, 2015 07:44 PM

    Feodor Fitsner's Avatar

    On AppVeyor it's adding nuget restore <path-to\your-solution.sln> into "Before build" section (or "Install").

  4. 4 Posted by corey on 07 Aug, 2015 08:43 PM

    corey's Avatar

    So I did that and it says "all packages listed are already installed"

    Here is the full verbose gist https://gist.github.com/CoreyH/5b58832e4c36e65bb2c2

  5. Support Staff 5 Posted by Feodor Fitsner on 07 Aug, 2015 09:01 PM

    Feodor Fitsner's Avatar

    This lines are interesting:

    [00:09:35] nuget restore c:\projects\URDB-home\URDBNew.sln
    [00:09:57] All packages listed in packages.config are already installed.

    Do you have packages folder committed in the repo?

    If so, make sure it contains that file packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props

    You can add this command to check what's in there:

    dir packages\Microsoft.Net.Compilers.1.0.0 /s /b
  6. 6 Posted by corey on 07 Aug, 2015 11:54 PM

    corey's Avatar

    Okay, I had an entry for "build" in gitignore. I took that out and now I am facing this:

    c:\projects\URDB-home\packages\Microsoft.Net.Compilers.1.0.0\tools\Microsoft.CSharp. Core.targets(67,5): error MSB6004: The specified task executable location "c:\projects\URDB-home\packages\Microsoft.Net.Compilers.1.0.0\build\..\tools\csc.exe" is invalid.

  7. Support Staff 7 Posted by Feodor Fitsner on 08 Aug, 2015 12:02 AM

    Feodor Fitsner's Avatar

    Make sure csc.exe exists in tools folder.

    Why wouldn't you just restore those packages during the build rather than storing them in repo?

  8. 8 Posted by corey on 08 Aug, 2015 12:41 AM

    corey's Avatar

    I have no idea what I'm doing

    I don't have a tools folder that I know of. I am happy to try to do package restore during the build if you can direct me that way.

  9. Support Staff 9 Posted by Feodor Fitsner on 08 Aug, 2015 03:59 AM

    Feodor Fitsner's Avatar

    Without changing your repo you can try doing something like:

    rd /s /q packages
    nuget restore
  10. 10 Posted by corey on 15 Sep, 2015 09:20 PM

    corey's Avatar

    For the record, the issue turned out to be pretty straight forward.

    We had "*.exe" in our .gitignore and the csc.exe was missing. I fixed gitignore, pushed again and it worked.

  11. corey closed this discussion on 15 Sep, 2015 10:23 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac