"Already has a reference to Essential.Diagnostics" - visual-studio

I tried installing Essential.Diagnostics via
Install-Package Essential.Diagnostics
But I had an issue where it said I was referencing something that didn't exist, so I tried removing the reference, and now I don't know how to re-add it. When I run the above command in the Package Manager Console again, it keeps saying my project already has a reference to it, even though I can see in the Solution Explorer that it isn't there.
How do I fix this?

Just noticed a file called "packages.config" in my project. I opened that, and it contained the suspect package. I deleted the file and re-installed the package. Successfully added now.
I guess that leaves the question, how are you supposed to properly remove a package then?

Related

Own Nuget Server - The V2 feed at '' returned an unexpected status code '404 Not Found'

I created my own Nuget Server following the documentation and I got it, but I cannot access the packages from Visual Studio 2019 Community Nuget Package Manager.
So, when I do it through a browser I get this, which seems fine:
When I click on "here" to view the packages I see the test one I added, and if I click it I can even download it:
However, when I access by Visual Studio I get this:
The full error says:
[Nuget Server] The V2 feed at
'http://mywebsite.com/NugetServer/Packages/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework=''&includePrerelease=false&$skip=0&$top=26&semVerLevel=2.0.0'
returned an unexpected status code '404 Not Found'. But I can't figure
out why.
This is how I added it to the Nuget Manager:
This is the folder structure of the site:
As you can see the package test.1.0.0.nupkg is where the NugetServer project told me to put it.
I tried several things:
Giving Everyone FullControl of the folder (because at the beginning I got 403 Forbiden instead of 404)
Changing the folder structure, puting the nupkg package inside a folder named nuget, put the whole Packages folder inside the nuget folder and other things I saw as solutions in other Stackoverflow threads.
Transforming everything to VB as this Stackoverflow thread suggested.
Changing IIS parameters
Nothing worked for me, so I need a bit of help to find the way.
Maybe I need something for the "Search()" to work? I'm lost.
If you need more info I can provide, just ask, please.
Please go to Tools > Nuget Package Manager > Package Sources and check the resource is https://api.nuget.org/v3/index.json as below:
Nothing worked for me, so I need a bit of help to find the way.
Maybe I need something for the "Search()" to work? I'm lost.
If you need more info I can provide, just ask, please.
First, since you can get the nuget package and view the package on your local website according to this document, I'm sure you have no problem with the steps to create your own nuget server.
The main reason is that you use the wrong link such as the view package in the Package Source. Instead, you should use the Repository URLs which is specified. The error is just it cannot
Repository URLs
In the package manager settings, add the following URL to the list of Package Sources:https://xxxxxxxxx/NugetServer/nuget.
Adding packages
To add packages to the feed put package files (.nupkg files) in the folder D:\xxxxx\xxxx\NugetServer\Packages
So please refer to the related info in your PC.
Update 1
Sloution
1) put the nuget packages into your local path like D:\xxxxx\xxxx\NugetServer\Packages so that you can access the packages through your links.(do not create any other new folders and put packages into them)
2) change the package source to http://xxxxxx/NugetServer/nuget as Repository URLs in your PC saids.
Update 2
In addition, please do not forget to run the instance of the NugetServer project at the same time and when the first screenshot that you provided shows, you should follow the guidance of it.
Hope it could help you.

The "References" parameter is not supported by the "XamlGTask" task

Trying to lean Xamarin in vs2017
Doing the Quickstart
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/get-started-with-xaml?tabs=windows
After the project is created, you have to update the nugget packages, to fix the errors on "System"
This left me in a non compiling state. So I manually uninstalled and reinstalled the Xamarin.Forms and NetStandard Nuget package via the command line tool.
It then compiled and failed to deploy complaining about .netstandard. So I manually installed the .NetStandardLibrary nutget package.
It then compiled and deployed exactly once.
Now I'm getting a
Severity Code Description Project File Line Suppression State
Error MSB4064 The "References" parameter is not supported by the "XamlGTask" task. Verify the parameter exists on the task, and it is a settable public instance property. XQuickStart C:\Users\Brown.ericw.nuget\packages\xamarin.forms\3.6.0.264807\build\Xamarin.Forms.targets 90
Error.
How do I fix this?
Is Xamarin always this flakey? I mean this is a Hello world quick start, it shouldn't' be rocket science to get it working.
Seems you did a lot of things that might have corrupted your project.
Try to clean solution & delete Obj and Bin folder & restart visual studio.
If you still have the prob, you should check if you don't have a reference in your Standard Class Library that has nothing to do here (like a ref to your droid project or whatever).
VS somtimes have this kind of flakey issue. When you Make sure the code is ok, but VS is still promote some errors. You could refer to the following ways.
Clean your project, then re-build your project.
If you still get this error, close your VS, then open the project, delete all bin and obj folders in this project, Note:If you write a forms project, you should delete three times (drod,ios, PCL), open the prject, re-build your project in the end.
If above steps.it is not work, please delete the bin and obj folder in this project firstly, copy this project to another PC that installed VS, run this code.

Getting a "vspscc could not be found in your workspace, or you do not have permission to access it" error

Today, while trying to publish an app so I could test it, I suddenly got this error message:
The item
D:\ScratchSrc\TryNewReportViewer2017\TryNewReportViewer2017\TryNewReportViewer2017.csproj.vspscc
could not be found in your workspace, or you do not have permission to
access it.
That's a mystery to me, as I've never gotten this before and I was working with this app just last week. Publishing it, too.
I've looked for the .vspscc file. Found it exactly where it said it should be. So, the alternative is that I don't have permissions to it. I don't understand why I shouldn't have permissions to a file on my machine that I created, but whatever. So, how do I get permissions to my own file?
I'm working with VS 2017, TFS 2015 on premise.
This issue may due to the wrong source control binding for that specific xx.vspscc file.
Double check your source control bindings for that file in TFS. You could also try to unbind and rebind the file.
Then delete the file in local(back up local changes first) and get latest version from TFS. Finally do the publish again.
If above solution is still not working, try to delete local workspace and create a new one, get latest version of the file, modify the file with local changes (if you have) in your backup , check in the file, then do the publish .
Another reason for this problem is, that the vspscc file is not checked in.
Just do a "Compare" on the project folder to see, if it's missing.
If the csproj.vspscc is missing you can create a new one by removing the project in visual studio and adding it back
I was able to 'fix' the problem by going to the source control explorer, selecting the smproj file (which was checked out for editing), and checked it in by itself. Then, I checked in the Model.bim. Was able to do both of these things without getting the error.
I also tried all the usual things, deleting the entire solution directory, getting it from TFS again but nothing worked.
Noticed the version of Visual Studio 2019 was a few months old so upgraded to the latest. That fixed it!

Error reading NuGet.config

So all of a sudden a few of the computers at my job stopped working with NuGet.
The problem started with following error.
So I went over and examined the Log file which gave me following errors
Activitylog.xml (layout in the question went haywire - pastebin link)
So naturally I went over to the global config of NuGet just to find it empty. So I reinstalled NuGet, deleted the folder, reinstalled. You know the normal way of doing thing. After finding out that it didn't work, I tried it several times over with rebooting, registry cleaning, etc..
Also tried this VS2013: Error Loading Solution
So after a few tries
I managed to get to this point.
The funny thing about this issue, not all of our computers are having this problem, just certain ones. Anyway, I managed one time to get the right config that the NuGet tool window loaded correctly which gave me another error while building. (Mondays suck).
Error occurred while restoring NuGet packages: Error reading 'FILEPATH\21_MES_ACC\CSD4.WPF4.011DSP\nuget.config'.
So I'm not sure from this point how all these errors came to be and why not everybody is facing the same issue. Did someone face the same error and solved it? Do we need to reinstall things? Is this a NuGet issue? Is there a fix somewhere on the internet ?
Seems like there was an invisible whitespace in the nuget config file which was causing havoc

how to fix xamarin support jar file errors

I'm currently attempting to fix build issues which occured once i tried to update some component. they told me i need to update some references. Oddly enough i now get these issues:
Now i'll just add some text so someone comming from google can find the potential answer as well:
error reading xamarin android.support embedded jar error in opening zip file.
Does anyone know how to fix this? I've tried:
Deleting and restoring nugetpackages, in hopes the nuget install script supplied these files,
Uninstall+Install Support Package in Android SDK Manager
Deleting files, in hope they are just temporary references and are pulled by xamarin if they are missing.
Neither one of those attempts worked out sadly.
Any ideas?
Turns out the reason of this issue was actually my own impatience. At some point after package updates i must have canceled the build process assuming that it got stuck, because it just wouldn't deploy. That resulted in incomplete jar files.
I fixed the issue by deleting the folders in AppData/Local/Xamarin which raised errors and that in turn made sure the build process redownloads the required files properly.

Resources