I get this error that my NuGet config was supposed valid and it tells me to run a NuGet Restore, which I did many times, but it still doesn't manage to run the website. The problem is, that I cannot get into the NuGet Manager either, because VS just tells me that my config was invalid before closing the dialogue all together.
References:
Output:
Anyone of you ever experienced this? How can I get at least back to editing my packages?
Did you try to
Delete the nuget.config file at %AppData%/Nuget
Close the Solution and Re-Open
https://stackoverflow.com/a/38340901/1249386
VS17 - NuGet Config invalid
(According to the error messages, we could not give the most direct correct answer for this issue, we can only give you some troubleshootings. In order to avoid losing contact in the round-trip comments, I post those troubleshootings as answer instead of comments.)
update Visual Studio to the latest version.
Check if there is any nuget.config in your solution, if yes, please open it and check for XML syntax errors or you can delete it.
Create a new blank project check if this issue still persist, if yes, try to re-install the nuget package manager.
Hope this helps.
Remove-Item $env:APPDATA\Nuget\Nuget.config
Is the one-liner powershell version of #Sigar Dave.
Related
I am trying to install MinGW but it's always failing to install. See the picture for the error message.
Error
Welcome to StackOverflow! My name is Alex and I will try my best to fix this problem of yours.
First, do you have a firewall running? Try running it as an Administrator.
If those didn't work, then I believe it's to the sourgeforge or the network itself. This is probably temporary and will be fixed so I suggest you try it later.
Good luck!
Since I cannot comment, I suppose there is no other way than write an answer. I am having the same issue and it seems to be related to the automated installer, it appears to be broken. Try installing manually (download the zip and manually place in correct directories and set system paths).
I am trying to upgrade my WFP project from the VS 2015 format to the new VS 17 format. There is a lot of trial and error involved but I have come across an issue which I can find no solution for online:
Some of my code is looking for a file in a certain location:
name C:\git\myproj\packages\A.B.C.Installer.4.1.7\setup\dbpkg\MyProj.dbpkg is invalid.'
Unfortunately the new nuget places the same file in:
C:\git\myproj\packages\a.b.c.installer\4.1.7\setup\dbpkg\MyProj.dbpkg
It does two things different:
everything is lowercase
instead of appending the version, it create a new directory
How can I configure the nuget client to behave like it did before? I am unable to change my code to match.
How can I configure the nuget client to behave like it did before? I am unable to change my code to match.
I am afraid you have to update your code. That because this is the expected behavior now for the new NuGet.
Package ids and versions are case insensitive in NuGet and are now
written out lowercase to the global packages folder to avoid conflicts
on case sensitive file systems.
You can check some more details info from following thread:
NuGet PM 3.5.0 incorrectly using lowercase path in *.nuget.targets
So, if you update your project to the new VS 17 format, you have to update you code to resolve this issue. I saw you saying that you are unable to change my code to match, but this change was designed to make nuget work better, there is no ticket for us to return to the past at this moment.
Hope this helps.
I have set up a VSTS nuget feed. And I have pushed some packages two days ago. I was able to add those packages to my project. But I needed to push an other version for one of them. Made new nupgk version, pushed it and I can see it in VSTS, I can download it from there, Visual Studio 2017 is also listing it correctly but when I try to install it, I am getting an error:
Package 'whatever 1.0.1' is not found in the following primary source(s): 'https://whatever.pkgs.visualstudio.com/_packaging/feedname/nuget/v3/index.json'. Please verify all your online package sources are available (OR) package id, version are specified correctly. 0
What I have tried:
- waiting around 10 minutes
- restarted Visual Studio several times
- pasting the above url into a browser and refreshing it manually several times
One or more of these helped. But I would like to know if there is any canonic solution for that.
I used the answer widget to have some formatting. Still, this might not be "the" answer, as I don't know the mechanism beyond. But it looks to be a workaround.
Steps:
Create a solution with a library project (let's call it L01)
Add another library project to the solution (let's call it D01)
Make a nuget package from L01 (version 0.0.1)
Push the package to your VSTS feed
Manage packages for project D01 and browse your feed
Package L01 v0.0.1 will be listed
Add it to project D01, it will work
Edit L01 nuspec file and change version to 0.0.2
Build and push the new package
Go back to project D01 and refresh the package list. The update will be shown.
Try to update. It will fail with the error message from my question.
Now go to folder %localappdata%\NuGet\v3-cache (or equivalent)
Locate the folder corresponding to your feed and open it
Locate list_l01.lib_index.dat (where l01 is the package name) and delete it
Go back to project D01 and try to install the update. It will succeed.
Would be good if others could confirm. I have reproduced this several times.
Seems you are trying to download the package or packages that where just freshly pushed to VSTS nuget feed.
Since Visual Studio 2017 is listing it correctly, then the issue should not related to the feed on VSTS server.
If this occurs very recently(download the new refresh package) and your package is very large, this maybe a network delay. Suggest you use a fiddler trace when this issue happens again. This makes "some" sense, what you see is probably an incorrect propagation of pushed packages showing up in the search results but not yet available to download.
And some other also encounter the same issue and error as you.
FYI, I've been seeing this exact issue in the past month or so.
Switching between sources, uninstalling and reinstalling are some work
arounds, but not 100%. Pushing my own packages up to VSTS and then
it takes like 15 minutes to finally get it to install.
More details please take a look at this similar issue Package update not found when updating via Visual Studio Solution
I am using Visual Studio Community Edition 2017 and trying to create a UWP application.
I get the following error
Your project is not referencing the "UAP,Version=v10.0.10240" framework. Add a reference to "UAP,Version=v10.0.10240" in the "frameworks" section of your project.json, and then re-run NuGet restore.
I had the same issue on my build machine. What's weird is everything runs fine on my local machine.
I managed to fix this by going into the project properties for my UWP app, and changing the Target version to match the Min version.
The reason I believe this issue is happening is because when targeting a higher framework, on a Windows Server machine (the build agent) it doesn't restore all of the packages between your min and target version. It seems to build fine against the version you target.
By the way Ken, following the instructions given by the error don't fix the issue. Try not to be so rude. I came to this page looking for the same issue, and you are no help at all.
I have the same issue, after I remove my bin and obj folder, I can build mine and see the errors gone.
I recently ran across this same issue when updating the target framework. The issue turned out to be the Nuget Restore task in my VSTS Build definition needed to be updated to the latest version (2.*). Once I did that, the builds worked as expected.
I agree with Jeff. Ken Not sure if you should be giving any answers with this kind of attitude.
The error message is misleading there is not project.json at least you cannot see it in the Visual Studio explorer.
I had the same issue and have min and target version set to the same number but it would not build.
The fix was to make sure in Nuget package manager setting to tick checkbox 'Allow Nuget to download missing packages' and the one below it as well and rebuild the project.
This is a pretty weird mistake, but what worked for me :
1st Solution:
1 - Change your project target to "10.0.10586" (or up)
2 - Make a clean / nuget restore / rebuild
3 - Return the project target to the "10.0.10240"
4 - Make a clean / nuget restore / rebuild
Do not ask me why, but it worked :)
2nd Solution:
If you use a repository with Tortoise, try making a CLEANUP
I had an old Backup folder in my project that contained a project.json. Looks like it might have been from an earlier upgrade. I deleted Backup and got a good build.
This happens in exactly this manner, if projects were generated in the year 2017 in the phase where MS changed to project.json and then decided against it. I tried several solutions (and yeah, Ken White is so wrong!) and the cleanest way was to really build up a new clean project in the lastest and up to date version of Visual Studio (VS2015 did not work sustainable) and just copy over the old project content which is just a few minutes work. This will save you a lot of headaches especially working in a larger team!
I tried the above solutions but nothing worked. I had to backup and remove the UWP project and recreate it from scratch.
I tried a couple of solutions.
Solution 1
Open the solution from Windows explorer and search for project.json files. Open all of them (If you have multiple) and make sure the required framework versions are there. I frequently switch between build 10240 and 17763 and I get this error frequently. (I switch between git branches that target different frameworks of UWP) So instead of adding the exact version I just added only the 10.0 part like this.
"frameworks": {
"uap10.0": {}
},
Now if your project.json files are ok, search for project.lock.json files. If you have one or more of those, delete them.
Now clean your solution
Close VS
Delete all the bin and obj folders.
Reopen the VS and try to run the app.
Solution 2:
Go to project properties
Change the minimum and target version to something else and do a clean build. Then put the actual versions and build again.
Trying to migrate from vtiger 5.3.0 to 5.4.0 and getting this error when I navigate to the patch folder in a browser:
Warning: require_once(include/logging.php) [function.require-once]: failed to open stream: No such file or directory in \vtigercrm-5.3.0\apache\htdocs\vtigerCRM\upgrade\include\database\PearDatabase.php on line 1
Using google I've found people with this error with migrating different versions, though not these versions, and no forum topics with an actual answer to this problem, am I the only one!?
I put the patch in '\vtigercrm-5.3.0\apache\htdocs\vtigerCRM' then navigated to it and got this error, any ideas!?
Please Don`t use the patch if you want complate migration just follow this links.
Click here
if you want complete information just follow this links.
https://wiki.vtiger.com/index.php/Vtiger_CRM_5.4_Migration
I think it's a little late to say anything, however, I'm getting the same error. I think, from what I've read, that the problem may be the installation directory. I see you've moved everything to "upgrade". Maybe the problem was there.
The migration method that you are attempting is not to be done using a patch. What you are attempting to do will only work with a complete application package.