Severity Code Description Project File Line Suppression State Error The package Newtonsoft.Json with version 12.0.3 could not be found in - json.net

I moved a project from one PC to another and compiling the solution I get the following
Severity Code Description Project File Line Suppression State
Error The package Newtonsoft.Json with version 12.0.3 could not be
found in C:\Users\Usuario.nuget\packages,
C:\Microsoft\Xamarin\NuGet. Run a NuGet package restore to download
the package. BusinessLogic
I have already restored it, deleted it, reinstalled it and it continues to appear, what I see is that the routes that tell me there in the error are not on the pc that I brought the project, in the previous one they are
¿but if this is how I can remove these routes or remove this error?

Please check these two options under Tools-->Options
Please enable them first. Then, click Clear Nuget Caches button.
Also, please make sure that you have enabled nuget.org nuget pakage source https://api.nuget.org/v3/index.json.
If not, please add it:
When you finish them all, close VS, delete .vs hidden folder under the solution folder, bin and obj folder.
After that, restart your project and then click Rebuild button.

copying and renaming the database works for me and connection string also need to be updated to the new database name.

Related

My .cshtml page does not open

I am getting this error could not load file or assembly
microsoft.visualstudio.projectsystem.dotnet.14.0
version=14.0.0.0,culture=neutral,,public key token=b03f5f7f11a3a
or one of it's dependancies.the system cannot find the file specified.
Check the version of microsoft.visualstudio.projectsystem.dotnet in packages.config and see if it is different then the version of your DLL. If the problem still persists, run the code
update-package -reinstall
in your Package Manager Console.
Let me know for further problems regarding this.

Why did my solution fail to build overnight with the error "Failed to retrieve information from remote source"?

We have a solution file which contains several projects which builds just fine on my computer using both "dotnet" CLI as well as Visual Studio 2017. Literally overnight, the build would fail, and I cannot associate the change that may have attributed to the failure. Both VS2017 and CLI failed with a message like this:
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : Failed to retrieve information about 'System.Xml.XmlDocument' from remote source 'D:\mtp\proj.vs\hello_proj\bin\Release\PublishOutput'. [D:\mtp\proj.vs\server-ray\my_solution.sln]
This is is misleading, as the hello_proj where this seems to indicate, is configured for building "Debug" as oppose to the "Release" shown. I have already attempted to clear out all cached packages, copied packages to where the solution resides, and copied the packages to where the error indicates, but I could not get over this error. Nuget is obviously getting some information somewhere to look for the packages in the wrong place, but I don't really know where it gets that info from. I also verified that the "missing" packages exist in the "global-packages" folder (found by running "nuget local all -list").
I found something that fixed my problem; I searched for Nuget.Config in the entire C: drive and found one in %appdata%\Nuget\Nuget.config. I removed it and the build went through successfully. The Nuget.config was restored to some default values that fixed the problem. I can't explain it; just glad it worked.
It looks like that one of your dependencies is pointing to D: which could have been removed by any reason. I suggest you to delete the packages folder, find the dependency that refers to D: and remove and add it again from NuGet. By the end you can let Visual Studio restore all of dependencies.

Cannot install web grease via nuget because of permission access

I want to configure bundling to my new project. I have configured my project with TFS online but I cannot add any packages via nuget and always get this error.
The item F:\Project\MOC\packages\WebGrease.1.5.2\lib\WebGrease.dll could not be found in your workspace, or you do not have permission to access it.
The item F:\Project\MOC\packages\WebGrease.1.5.2\tools\install.ps1 could not be found in your workspace, or you do not have permission to access it.
The item F:\Project\MOC\packages\WebGrease.1.5.2\tools\uninstall.ps1 could not be found in your workspace, or you do not have permission to access it.
This maybe a nuget bug with older version. More details ,please refer the thread from GitHub: Install package fails when solution/project is bound to TFS source control
The bug is during uninstalling packages, nuget will delete package
files from TFS, but if user set disableSourceControllntegration to
true, package files are not added to TFS workplace during installing,
so TFS can't find those files during uninstalling,
The fix is to check disableSourceControlIntegration before deleting
package files from TFS.
Source Link: TFS Error "[file]not be found in your
workspace...."
Also suggest you to update your nuget version to latest and try again.

NuGet packages not found after sync from GitHub

We (me and three other people) will make an ASP.NET MVC application and use GitHub for version control. We've added some NuGet packages like Unity.MVC5.
Person one has commit and sync the project to the master branch. He's got no problems. The other three people sync the branch but they got problems with the NuGet libaries. See errors below:
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.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props.
Error: Metadata file D:\...\MarkeOnlineWebsite\MarkeOnline.Website\bin\MarkeOnline.Website.dll could not be found
Warning: The referenced component ... could not be found.
Update: I've also added this .gitignore file.
How could we solve this problem?

Xcode incorrectly reporting missing files

I had some files that I removed from my project. They don't show up anywhere when I grep the directory for files or the text inside of the files in my source but when I build my project it reports missing files as warnings. Cleaning and restarting the Xcode does not help.
Any ideas on where to look?
it seems like the issue was related to the files being added but not committed to my svn repository. when i removed them from being added the warning went away.
Check out this post for how to get this warning to go away: Missing file warnings showing up after upgrade to XCode 4
just check if Delete an unreferenced image from repository in Xcode can help;
try to delete the app and rebuild.
Got this error in xcode 8.0 with a git repository. Wanted to split code into a different file - so duplicated the file, added it to the project and then removed most code from the original file. At this point XCode showed an 'i' (missing file) in the project navigator but compiling the project works fine.
You can't commit with xcode however since it will show the "missing" file as non-existent in the commit-dialog (even though it is clearly there, selectable and editable in the project navigator).
Easy fix was to just commit all changes externally with sourcetree. The moment it was committed, everything worked fine again in xcode.

Resources