VS2017 Metadata file '.dll' could not be found - visual-studio

After upgrading to Visual Studio 2017, I am unable to build my project. Visual Studio 2015 still works when pointing at the exact same project.
this is the build errors I get Metadata file '******.dll' could not be found
I've already tried https://stackoverflow.com/a/17723774/3511012 with no success

I tracked the issue down to a specific NuGet package that has not yet been updated for visual studio 2017. (Baseclass.Contrib)
It isn't yet registered as having updates available through the nuget package manager, but you can manually update using the nuget console and running this command Install-Package Baseclass.Contrib.Nuget.Output -Version 2.3.0-vs20172

Related

How to install syncfusion javascript using nuget from visual studio community 2022 and visual studio code?

I tried the link here
https://www.nuget.org/packages/Syncfusion.JavaScript/
Install-Package Syncfusion.JavaScript -Version 19.4.0.47
From inside VS 2022 community I can not find nuget GUI so I used the console and I get this
I tried from nuget.exe and get this
I tried in vs code I pressed Ctrl+Shit+P and typed nuget to install nuget GUI but nothing found. What I should do ?
To install the NuGet packages in Visual Studio through package manager Console, run the command under Package Manager tab.
Install-Package Syncfusion.JavaScript -Version 19.4.0.47
install-package-visual-studio
To install NuGet packages in the Visual Studio Code, please run the below command in the Visual Studio Code terminal which is under .NET CLI tab in the nuget.org
dotnet add package Syncfusion.JavaScript –version 19.4.0.47
install-package-vscode
For more details to install NuGet packages in the application, please refer the below link:
https://ej2.syncfusion.com/aspnetcore/documentation/nuget-packages/

how generate project.assets.json

I create a new .NET Standard project and try to build without any code added, I get
"Assets file 'E:\Storage\Google Drive\My Content\My Documents\My LC
TECH\Projects\LC Development\LC.Assets\obj\project.assets.json' not
found. Run a NuGet package restore to generate this file."
I've tried to run dotnet restore but without luck.
How to create the file or remove reference to it?
I use Visual Studio 2019 preview, but had same error when using Visual Studio 2017.
turned out that this was caused by an faulty installation of .net core sdk.
installed everything again and it started working

aspnetboilerplate core brand new project does not build in vs 2017

I have downloaded asp.net core 2.x angular js template. Opened up with vs 2017 version 15.4.1 and it does not build. When I try to build or restore nuget packages it throws up below error.
The error message :
Severity Code Description Project File Line Suppression State
Error Assets file '...\3.3.2\aspnet-core\src\MyNg2Project.Core\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. MyNg2Project.Core C:\Program Files\dotnet\sdk\2.0.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets
Thanks in advance.
It turned out I had specified local nuget package source to update or restore packages with my team in earlier version of visual studio. Visual studio 2017 assumed that this local path still exist and prioritized it. When I uncheck the old path from the main source of nuget package it worked like a charm.

Enable nuget package restore crash visual studio 2013 and 2015

After I installed Visual Studio 2015, my NuGet package, and my visual studio 2013 this strange first when using "enable nuget package restore" visual studio breaks and freezes:
another thing is that the visual studio 2015 when creating any project also crash:
Enable nuget package restore is obsolete, use the Automatic Package Restore instead instead. If you don't want automatic restore you can disable it in VS options.
after I reasarch, Ifound:
Uninstall Nuget extension from Visual Studio 2015 RC
2-Delete the folder in the directory showed below
Download the installation file of the older version of Nuget extension from this link: https://yadi.sk/d/BvJopnXOgF5rX
Extract the downloaded file to a folder on your machine.
Open Developer Commant Promt for VS 2015
Type this command to install it: VSIXInstaller [your_extracted_folder_path]\NuGet.Tools.vsix /admin
Example: VSIXInstaller c:\nuget14_VisualStudio\NuGet.Tools.vsix /admin
Press enter to start installing
after use visual studio..
all credits go to: https://tndhuy.wordpress.com/2015/05/14/solved-nuget-package-management-problem-in-visual-studio-2015-rc/
Visual Studio froze when I loaded a particular solution.
By disabling nuget package manager it worked but I could no longer use nuget.
I have removed the .vs folder from the solution and since visual studio is loading well! :-)
Maybe this can help...

Nuget versioning issue with package restore

I am unable to install a package (using package restore) due to some kind of versioning issue with Nuget. Here are the steps I took:
build project:
error : The schema version of 'MagicalUnicorn.MvcErrorToolkit' is incompatible with version 1.6.21205.9031 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
Extension manager says version is: 2.0.30619.9119.
Ok, restart VS as administrator, extension manager uninstall nuget.
restart VS as administrator again, search for nuget and install.
Extension manager again says version is: 2.0.30619.9119.
rebuild project:
error : The schema version of 'MagicalUnicorn.MvcErrorToolkit' is incompatible with version 1.6.21205.9031 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
Ok, so restart VS as administrator, extension manager uninstall nuget again.
This time download from http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c
Run the installer, all seems ok.
Extension manager again says version is: 2.0.30619.9119.
rebuild project:
error : The schema version of 'MagicalUnicorn.MvcErrorToolkit' is incompatible with version 1.6.21205.9031 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
Grr! Any ideas?
It looks like problem in nuget command line tool. When you enable 'Nuget package restore' feature it adds .nuget folder to you solution with nuget.exe. And when you compile project this tool is using to download missing packages, not VS extension is used here. So try update this tool from command line:
cd .nuget
nuget.exe update -Self
Procedure screenshot:
The following worked for me in Visual Studio 2012:
Run VS 2012 as Administrator
Click Tools -- Extensions and Updates
In the left nav, Updates -- Visual Studio Gallery
Click Update on NuGet Package Manager
Install the update
Restart Visual Studio
None of the offered solutions worked for me (Visual Studio 2013, Nuget Package Manager Version 2.8.5).
I had same error but it was saying I had version 2.5.4.
I fixed it by going to Tools > Nuget Manager Console > Nuget Package Console. This open's up a command line window. At the top of the window was a prompt to download missing packages for my project.
Pressed the download button and errors went away upon build.
I was facing the same issue. I resolved it by selecting Tools on VS 2010 Menu --> Library Package Manager --> Package Manager Settings --> Check "Automatically check for updates". After that I restarted VS and was prompted for Nuget Update Installation. Once the update was installed, the Nuget package, HTTP Client in my case, got installed smoothly.
I faced to this problem and I checked all answers that were this page and at the end my problem did not solved. After lot of search on web I could update my nuget from original site
http://docs.nuget.org/docs/start-here/installing-nuget
and for example for vs2010 :
http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c
At this site select your version of VS and then update it .
Note : before installing nuget,close all Visual Studios and after install,Open your project.
Thanks
This above did not work for me, completely. There is one last step that is IMPORTANT to note. After downloading the latest nuget version, you may notice that the same error prints in the output window. The reason is due to the .nuget folder containing a NuGet.exe which specifies a version number.
The solution (for me and perhaps to those of your that did not resolve your issue with the above directions), is to
Delete the .nuget folder from you solution.
Right click your web project and click Enable Nuget Restore.
The directions above should cause a NEW .nuget folder to be added, this time the NuGet.exe should be the newest version of nuget that you downloaded.

Resources