NuGet package restore problems...

RobIII's Avatar

RobIII

24 Feb, 2018 10:06 PM

I'm trying very hard to fix the following issue for my project:

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.2.6.1\build\Microsoft.Net.Compilers.props.

warning MSB3245: Could not resolve this reference. Could not locate the assembly "<whatever>". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\projects\twofactorauth-net\TwoFactorAuth.Net.Demo\TwoFactorAuth.Net.Demo.csproj]

As you can see I've already tried some suggestions (mostly from here and from help.appveyor.com):

I'm, apparently, not smart enough to fix this...

Does anyone have any suggestion on what the correct fix is? (I could disable the .Demo project for release builds, I don't care about it actually, but it feels like swatting a fly with a cannon)

  1. 1 Posted by RobIII on 24 Feb, 2018 10:21 PM

    RobIII's Avatar

    After (temporarily) trying to disable the .Demo project the next one to fall flat on it's face was the unittests. Same issue....

  2. 2 Posted by Ilya Finkelshte... on 27 Feb, 2018 06:39 AM

    Ilya Finkelshteyn's Avatar

    Failed project does not seem to look like .NET Core project. Did you try nuget restore instead of (or as addition to) dotnet restore?

  3. 3 Posted by RobIII on 27 Feb, 2018 09:49 AM

    RobIII's Avatar

    After some more tinkering (setting the SHFBROOT environment variable, adding nuget restore (great find! thanks!)) it finally builds as intended. Thank you!

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:27 AM.

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

Keyboard shortcuts

Generic

? 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