Could not find a part of the path '..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll' - nuget

Recently I updated my Nuget Packages for my ASP.NET Web API project (.NET 4.7.1) and build it successfully without any issues. However, when I tried to check-in the solution to my VSTS source control. I got the following error:
Could not find a part of the path '..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll'.
This looks like a bug to me and I couldn't find a way to solve this issue while Googling etc...Is there a way to solve this?

To solve this this is what I did.
I first removed the version 4.4.1 and added the version (previous) 4.4.0 and took the backup of the version 4.4.0 and then re-added the version 4.4.1. Backup is necessary because only one version can be present in the packages folder by Nuget.
Install-Package System.Diagnostics.DiagnosticSource -Version 4.4.0
Install-Package System.Diagnostics.DiagnosticSource -Version 4.4.1
Finally I copied the entire 4.4.0 folder to the packages folder and checked-in the solution successfully. Now there are two versions (folders) are present in the packages folder locally (but 4.4.1 is used in the application).
This may be helpful for some but is there any other way to solve this issue?

Related

Reinstall Nuget Package Manager in Visual Studio 2019

I am facing a problem with my project.
The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?
This has happened before and I solved it by reinstalling the Nuget Package Manager using a command. Unfortunately, I am not finding that command again. I tried to find the solution online but everything I am getting is installing/reinstalling NuGet packages and not package manager.
Found this article: https://forums.asp.net/t/1776324.aspx?How+to+install+upgrade+VS+NuGet+Package+Manager+ but It's not applicable here.
NuGet Package Manager is preinstalled in VS2019 and no separate package to download and install. Also, there's not Extension Manage in VS2019 like older versions.
Please Let me know the command to reinstall NuGet Package Manager in Visual Studio 2019.
Such nuget restore issues can normally fix by deleting the obj folder where the nuget files like project.assets.json, projectname.csproj.nuget.g.targets, projectname.csproj.nuget.g.props, projectname.csproj.nuget.dgspec.json and projectnamecsproj.nuget.cache are stored.
If this still doesn't fix it, delete the hidden .vs folder inside the solution, where Visual Studio stores the user settings for the project.

SonarLint cannot connect to SonarQube Server

I have eclipse mars2 with sonarLint 2.1.
I try to connect to a SonarQube Server 5.1.2
When I try to connect via the eclipse GUI, the following error occurs:
The following plugins do not meet the required minimum versions, please upgrade them: java (installed: 3.0, minimum: 3.8)
Do you have any ideas? Thank you guys!
The plugin the message is referring to is the Sonar Java Plugin. Log in to Sonar as admin, go to Administration/System/Update Center and you'll see that the current installed plugin version is 3.0. Update it to the newest version available and it should work.
[Edit] - The upgrade is triggered by just clicking the button, but after it is downloaded and installed, you'll have to restart the Sonar server.
Another option is to downgrade to an older version of the plugin:
Exit IntelliJ
Delete the files in the following folder (your version of Idea may be in a slightly different folder
C:\Users\USER.IdeaIC2018.1\config\plugins\SonarLint\lib
Download version 3.5.1.2759 from the following: https://plugins.jetbrains.com/plugin/7973-sonarlint
Unzip all the files from the downloaded file to the above folder
The newest available version in the update centre is 3.14 for some reasons.
Anybody has been able to install the 3.8?

Nuget restore on monodevelop Ubuntu - references seem to not work?

After restoring nugets on Monodevelop / Ubuntu the packages are all there but the projects complain that there isn't a DLL for the version:
Assembly not found for Framework Mono / .Net4.5
This code works on other machines so i know the references are correct.
Also - looking in the CSPROJ I can see the references are resolved to dlls in the packages folder. So everything downloaded OK.
I have set MonoDevelop to use MSBuild as there was a similar post somewhere but that's not working.
Is there a trick to getting this to work?

Nuget upgrade issues

I recently installed Visual Studio on a new computer and as a result I now have Nuget 1.5.2. This version doesn't seem to work with my old solution. When I add a new project and try adding references via Nuget, it says they are already installed and does nothing, even though that reference doesn't exist in the new project.
Does anyone know why this might be happening or alternatively where I can download the old Nuget (1.4.2)?
Thanks!
The NuGet Command Line is available as a NuGet package.
Just like with any other NuGet package, you can get a specific version by using the -Version switch in the Package Manager Console.
To get v1.4.2 of the NuGet command line tool, you should execute the following PowerShell script from the Package Manager Console:
Install-Package Nuget.CommandLine -Version 1.4.20615.182

Where are the preferences for HGEclipse plugin in Eclipse 3.5?

I've installed HgEclipse plugin from the update site: http://hge.javaforge.com/hgeclipse
From some reason, when I go to Window->Preferences, I can't find the category Mercurial under Team.
Someone knows how to solve this?
My eclipse version is 3.5 (Galileo).
My plugin version is 1.5.0
I have hg 1.4 installed on my machine.
I'm running on Fedora Core 11.
Thanks!
Asaf
It means the installation did not complete successfully.
Could you check your logs (Windows / Show Views / Error logs) to see what gone wrong?
It seams the problem is related to a (fedora?)eclipse bug, and issues with permissions to the plugin folder.
I solved it by uninstalling hgeclipse, starting eclipse as root, installing hgeclipse, and then restarting as my normal user again.
The project URL is http://javaforge.com/project/HGE, when you create an account and put your issue into the prokect's bug tracker, you will get help there.