Symbol Server Delete Command Doesn't Work - nuget

I'm preparing to host an internal symbol server for some internal libraries using SymbolSource Community Edition. While testing the workflow of adding and updating packages, I also tested the ability to delete symbols from the server. I'm using NuGet.exe to execute commands against the symbol server. Although the NuGet delete command says that it completed successfully, the files are still on the internal symbol server. The command that I'm using is:
D:\>nuget delete <package name> 0.1.0-alpha <GUID>
-Source http://localhost/SymbolServer/NuGet/
The output from the command is:
<package name> 0.1.0-alpha will be deleted from the 'http://localhost/SymbolServer/NuGet/'.
Would you like to continue? (y/N) y
Deleting <package name> 0.1.0-alpha from the 'http://localhost/SymbolServer/NuGet/'.
<package name> 0.1.0-alpha was deleted successfully.
Delete functionality (via NuGet) for symbols hosted on SymbolSource.org is mentioned at http://www.symbolsource.org/Public/Blog/View/2011-06-27/Deleting_packages_from_SymbolSource. This functionality really wasn't "delete" functionality, but rather was like a "hide" command. However, there is a thread at https://groups.google.com/forum/#!searchin/symbolsource/delete/symbolsource/Z63nIr_s-DY/V2rDBdsDI2IJ from 2011 that also mentions implementing "full" delete functionality was at the top of the priority list at that point in time. Anyone know if this functionality was actually implemented? I can't seem to find any further references to it on the SymbolSource.org site.
When I run Process Monitor on the server to monitor file activity corresponding to executing the NuGet delete command, I can see activity - but the bulk of the activity entries have the status "PATH NOT FOUND" and "NAME NOT FOUND". The directory that is being referenced in the Process Monitor logs isn't what I would expect. The primary directory being referenced is:
D:\path\to\SymbolSourceApp\NuGet
The symbol files, however, are in the directory:
D:\path\to\SymbolSourceApp\Data
I think I either have to be missing something, or the delete command was never implemented. Anyone know which might be the case?

Related

vscode interactive notebooks nuget directory error

I was trying to include a nuget package in my C# cell, like the example below:
#r "nuget: PackageIWantToInclude"
when suddenly, I got a similar error like this:
Error: PackageManagement Error 3217 The source directory 'D:\MyLocalDirectory' not found
note that I have not made any edits on the settings pointing to any directory with the address 'D:\MyLocalDirectory'. I've also looked for a solution elsewhere without any success. Can anyone give me a hint on how to bring the source directory back into its default?
Turns out, vscode interactive notebook uses the nuget configuration included in Nuget.Config found in "C:\Users{computer name}\AppData\Roaming\NuGet".
In that current machine where the error occurs, I have some local package sources included that were already non-existent, though they were already disabled, as indicated when viewed using this command dotnet nuget list source.
What I did was to remove the non-existent package source from the Nuget.Config file--in this example that would be:
<add key="NonExistentSource" value="D:\MyLocalDirectory" />
and then I restarted the notebook kernel by:
opening Command Palette (CTRL+SHFT+P) or under View>>Command Palette..
and then selecting the restart notebook's kernel

Perforce CLI reconcile adds 'ghost' files to my working directory

Have a perplexing bug when I try to reconcile work through the CLI for perforce in that I get a large amount of files detected and added to the changelist whenever I run the command.
This happens regardless of where my current working directory is but the files always come from there, if my working directory is outside the project's root I get a 'Path {path} is not under client's root' error and they are not added, however if my working directory is under the project root they are detected and added as missing files.
I've tried numerous different combinations of the reconcile command, explicitly stating the port, user, client etc., setting up P4Config, using relative and absolute paths, changing the working directory - but I always get these ghost files.
Has anyone come across this before? Could this be a bug with P4 itself?
Edit: I finally fixed this by reinstalling P4V so I'm assuming this was some bug either my install of perforce or any local config files that would have been reset upon reinstall. For reference this is the page that finally fixed it https://community.perforce.com/s/article/15324
This is the result of the following bug:
https://www.perforce.com/perforce/doc.current/user/relnotes.txt
Bugs fixed in 2020.1 Patch 1 (2020.1/1991450)
...
#1964794 (Job #102470) *
'p4 reconcile'/'p4 status' might report about invalid filenames
of the form '//depot/0' or '//depot/100', etc. This is fixed.
Since this was fixed in a 2020.1 patch, it can be inferred that it only affects specific 2020.1 builds (i.e. those before the patch).
To fix it, make sure you're on a client version (p4 or P4V; this is not a server-side bug) whose changelist number is higher than 1964794. No special reinstallation procedure is needed; just download the latest binary/installer from Perforce's website.
Force a reinstall of P4V to fix this, details can be found here:
https://community.perforce.com/s/article/15324
Or if that page is taken down for any reason:
SOLUTION
Forcing a reinstall using the Windows msiexec installer utility with Windows msi installer file extracted from the p4vinst64.exe file can often successfully complete a full reinstall where running the P4V exe installer such as "p4vinst64.exe" fails
If not already downloaded, obtain the appropiate Windows installer for P4V (for example "p4vinst64.exe" for 64 bit Windows platforms). Currently these can be downloaded from https://www.perforce.com/downloads/helix-visual-client-p4v
Extract the msi from p4vinst64.exe; for example to extract it to "c:\p4v", open a Windows a cmd prompt and change directory to the location where p4vinst64.exe .is located and run the following command:
p4vinst64.exe /s /b"c:\p4v" /v"/qn"
Now from c:\p4v, run the following command to force a full reinstall:
msiexec /i "p4vinst64.msi" /qn REINSTALL=ALL REINSTALLMODE=vamus /L*v log.txt

Doing a local NuGet package installation but getting the error - Unable to get repository signature information

I'm trying to do an offline NuGet package installation by following the answer by Samuel Jack here:
Text
1. Add the files to a folder called LocalPackages next to solution
2. Create a file called NuGet.config next to solution file
The .nupkg files are stored locally and installed using NuGet Package Manager but I'm getting this error - "Unable to get repository signature information for source https://api.nuget.org/v3-index/repository-signatures/5.0.0/index.json. Response status code does not indicate success: 403 (Forbidden)."
I don't understand why the package manager needs to get repository signature information from the internet when I'm trying to do an offline installation. Internet connection is blocked in my server & that's why I'm getting 403 error.
How do I install the NuGet packages locally without getting the error?
How do I install the NuGet packages locally without getting the error?
You can try the following steps:
Solution
1) please make sure that you have these xml nodes in the new Nuget.config file:
<disabledPackageSources>
<add key="xxxxx"(the source name of api.nuget.org/v3-index/repository-signatures/5.0.0/index.json) value="true" />
</disabledPackageSources>
2) clean all nuget caches or delete the packages folder under C:\Users\xxxx\.nuget\packages.
3) If you add the new Nuget.config file in your solution , it cannot work immediately, it needs a restart. You should restart VS and then open your project, and after that, it can work.

NuGet Server cannot find .nupkg package files

Okay this is a derivative of Could not load file or assembly 'NuGet.Server, Version=2.11.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies seeing as though I couldn't find a solution to that.
I am publishing my Nuget Server project to my Windows 2012 R2 server and pointing to the applicable directory where the files live. The package files exist, as shown below in the screenshot however I keep on getting the below error:
Severity Code Description Project File Line Suppression State
Error Copying file Packages\PackageName.1.0.0.nupkg to obj\Release\Package\PackageTmp\Packages\PackageNameJson.1.0.0.nupkg failed. Could not find file 'Packages\PackageName.1.0.0.nupkg'. nuget_server_02 0
I have NuGet Server v2.11.3 installed and my project targets .NET Framework 4.6. One thing to note is that the packages themselves are from an earlier version of .NET - most likely 3.5.
This is my web.config file:
<add key="packagesPath" value="D:\RootFolder\SubFolder\SolutionNameFolder\ProjectNameFolder\Packages"/>
Even after several Restore NuGet Packages attempts I am still faced with this dilemma. The one thing I am really struggling to understand is if I point the packagesPath to a local directory, it works and does retrieve the packages however, when I point to the very same project on my server I get this headache.
Previously, in the included link to the related SO question, I could publish but now I can't even get through that stage even though I never made any changes to the project since last working on it. I decided to revisit it today.
UPDATE:
I have deleted the bin folder and rebuilt my solution as per Could not load file or assembly 'someProject' or one of its dependencies. Access is denied But it still can't find the file.
You can run your nuget server and it will show an html file as output (Default.aspx). You can, of course, modify this file to make it look like anything you want and otherwise change it. You can't change the way the nuget server service behaves because that is run from a dll. You should be able to show your repository files using the output page of your nuget server.
I encountered a similar set of errors, and monitored the Event Viewer while I was trying to show the contents of my repository.
The Event Viewer showed that an error was being thrown every time my Nuget Server attempted to list the contents of the packages folder.
Keeping in mind that nuget packages are zip files, and to display the details on the information contained in the nuget packages, the nuget server must unzip them. If the file is corrupted, the server will throw an error and stop attempting to list the contents of any further files. This error results in a w3wp.exe crash. It will be recorded as an ASP.NET error in the Windows->Applications section of the event log.
The cure for me was to delete the contents of the packages folder on my nuget server, and re-up them.
This may be impractical if you have a lot of files in your repository, so any files that were uploaded near the first error shown in the event viewer should be chosen for upload first.
One of the files is likely corrupted.
I would recommend checking out the event viewer on your server, and making sure you have no corrupted files in your repository.
You can view (and edit, to a point) your repository contents with Nuget Package Explorer. If the file you want to view is corrupted, then it should show an error for that file. You can then re-up that file, and if the problem is a file problem, this will cure it.
You can also reinstall your nuget server if that fails. It is somewhat unlikely that the code has been corrupted, but worth a shot.
Good luck.

Any way to run commands/script after VS2015 Publish wizard has copied files to output?

I have a very simple Windows service project I want to deploy to a server using Visual Studio 2015. I can successfully deploy using the Publish wizard (right-click on project -> Publish and deploy to \\myserver\c$\somepath\), but I need to 1) stop the service before publishing (so that the executable can be replaced), and 2) restart the service after the files have been copied.
I know how to start/stop services from the command line, and this answer provides a way to do it directly in a build action. However, I can't seem to find a way to execute any action after VS has copied the files to the output directory on the server.
For example, I have tried adding the following to my .csproj file without luck:
<Target Name="Mytarget" AfterTargets="AfterPublish">
<Warning Text="After AfterPublish" />
</Target>
Mytarget executes before VS actually copies the files to the server, so evidently, I can't hook onto AfterPublish. I've also tried PipelinePreDeployCopyAllFilesToOneFolder, CopyAllFilesToSingleFolderForPackage, and MSDeployPublish without luck (these don't seem to execute at all).
My end goal is to allow more-or-less one-click updating of the service, without having to log on to remote desktop and run a script manually after each update.
Is there any way I can have VS automatically execute an action after publishing a Windows service project to a server?