In my case, I had to remove the following from the .csproj file:
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" /> </Target>
In fact, in this snippet you can see where the error message is coming from.
I was converting from MSBuild-Integrated Package Restore to Automatic Package Restore (http://docs.nuget.org/docs/workflows/migrating-to-automatic-package-restore)
Related Posts:
- Visual Studio doesn’t see Team Explorer
- How do I install a NuGet package .nupkg file locally?
- An error occurred while signing: SignTool.exe not found
- How to fix “Root element is missing.” when doing a Visual Studio (VS) Build?
- Error ‘LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt’ after installing Visual Studio 2012 Release Preview
- The project type is not supported by this installation
- LINK : fatal error LNK1104: cannot open file ‘D:\…\MyProj.exe’
- What are the differences between Visual Studio Code and Visual Studio?
- What are the differences between Visual Studio Code and Visual Studio?
- How to download Visual Studio Community Edition 2017 (not 2019)
- How to download Visual Studio Community Edition 2015 (not 2017)
- Error : Could not load file or assembly or one of it’s dependencies
- How do you auto format code in Visual Studio?
- How to declare a global variable in C++
- What is “stdafx.h” used for in Visual Studio?
- Configuration System Failed to Initialize
- Visual Studio error “Object reference not set to an instance of an object” after install of ASP.NET and Web Tools 2015
- Cannot Connect to Server – A network-related or instance-specific error
- ERROR: Cannot open source file ” “
- Check in / Check out in subversion
- How do I fix the indentation of selected lines in Visual Studio
- C++ cannot open source file
- Why Visual Studio 2015 can’t run exe file (ucrtbased.dll)?
- Cannot open Visual Studio – throw error ‘cannot run when setup is in progress’
- Stuck while installing Visual Studio 2015 (Update for Microsoft Windows (KB2999226))
- Nuget connection attempt failed “Unable to load the service index for source”
- Fresh installed Visual Studio 2017 won’t create C++ project with error 0x80041fe2
- Source information missing from the debug information for this module – PDB successfully loaded
- Visual Studio – vdproj is incompatible
- Are Visual Studio 2017 Build Tools still available for download?
- What is vshub.exe in the system tray?
- serviceHub.Host.CLR.x86 taking a lot of memory and CPC
- Visual Studio Project vs. Solution
- Receiving access denied error from Visual Studio when trying to change target framework
- Preventing console window from closing on Visual Studio C/C++ Console application
- What does Visual Studio mean by normalize inconsistent line endings?
- Visual Studio 2015 Intellisense not working
- Is there a list of Visual Studio environment variables? [duplicate]
- The name ‘InitializeComponent’ does not exist in the current context
- “Are you missing an assembly reference?” compile error – Visual Studio
- Error HRESULT E_FAIL has been returned from a call to a COM component VS2012 when debugging
- How to install Visual Studio Build Tools 2010 on Visual Studio 2015 Community?
- error A2022: instruction operands must be the same size
- The ‘packages’ element is not declared
- How do I open a Visual Studio project in design view?
- Visual Studio 2019 – error MSB8020: The build tools for Visual Studio 2013 cannot be found
- Consider app.config remapping of assembly with no app.config mapping
- Visual Studio not displaying compile time errors in editor
- XML schema error – root element of a w3c xml schema
- Web Developer Tools option must be installed
- Unable to launch the IIS Express Web server
- How can I rename a project folder from within Visual Studio?
- Visual studio Express Edition vs Community
- Visual Studio: Add existing folder(s) to project
- Signing out from TFS and sign in with new credentials
- Unresolved external symbol in object files
- Chrome returns “Bad Request – Request Too Long” when navigating to local IIS Express
- Awesomium sdk download
- What are the differences between Visual Studio Code and Visual Studio?
- Error Message : Cannot find or open the PDB file
- Windows 7 exception code: 0xc0000409
- Installation of MySQL for Visual Studio 1.2.8 failed
- Command to collapse all sections of code?
- Cannot open include file: ‘stdio.h’ – Visual Studio Community 2017 – C++ Error
- Missing vc_runtimeminimum_x86.msi and installation won’t work
- Visual Studio debugger error: Unable to start program Specified file cannot be found
- How to remove error about glyphicons-halflings-regular.woff2 not found
- What is and how to fix System.TypeInitializationException error?
- Where can I find System.Web.Helpers, System.Web.WebPages, and System.Web.Razor?
- Can’t use System.Windows.Forms
- VC++ fatal error LNK1168: cannot open filename.exe for writing
- What installed Windows Kits
- How to fix “namespace x already contains a definition for x” error? Happened after converting to VS2010
- How do I create a Shared Code project (.shproj)
- Can’t Add View from Controller in VS 2015 : “There was an error running the selected code generator”
- How do I remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?
- Microsoft Visual C++ 9.0 is required
- Dlib installation error?
- Visual studio 2019 freezes when debugging
- IntelliSense: the object has type qualifiers that are not compatible with the member function
- Cannot open Windows.h in Microsoft Visual Studio
- How to solve ‘…is a ‘type’, which is not valid in the given context’? (C#)
- What is the purpose of the vshost.exe file?
- Could not load file or assembly ‘Microsoft.CodeDom.Providers.DotNetCompilerPlatform
- LINK : fatal error LNK1561: entry point must be defined ERROR IN VC++
- Win32 Console Application
- Unable to connect to any of the specified mysql hosts. C# MySQL
- How to fix inconsistent line endings for whole VS solution?
- Getting “Handshake failed…unexpected packet format” when using WebClient.UploadFile() with “https” when the server has a valid SSL certificate
- Visual Studio Cannot Open File
- The type or namespace name could not be found
- C# Debug – cannot start debugging because the debug target is missing
- What is the return type of sizeof operator?
- Is there any way to program Java on Visual Studio 2015
- How to resolve file being used by another process?
- error C2065: ‘cout’ : undeclared identifier
- Does WPF Work with C++?
- error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
- Is it possible to install a C# compiler without Visual Studio?
- Difference between Chocolatey and NuGet