In a .NET project, select Build -> Publish -> and see the default "No profiles created, select a method" screen. Choose Folder and complete the wizard. Click Finish. Receive the following Microsoftian error:
"One or more errors occured"
With no other information.
Having already solved this, I'm posting to share the answer and publicly shame Microsoft for these lame error messages. Visual Studio is a program only used by developers: we can handle a little more information, and in fact need it to solve these minor, job-derailing errors in a timely way and hold onto some sanity while the rest of the program is locking up and spewing errors all day.
Navigate to [Your project's directory] -> Properties -> Publish Profiles and delete the contents (or move to another location if you might want these back later). Then, in VS, click Finish in the publish profile wizard again.
It didn't work for me with removing Properties.
On this link, Microsoft explains, that they have made a fix and advices instaling preview-version of Visual Studio 2019. Didn't work for me either.
I created a brand new MVC-project and tried to import publish profile, and it worked, so it looks like I have a problem in my original project.
Then I copied [Properties]>[PublishProfile] from new- to original project and th profile now works in original project.
After this copy, I then tried to make a new import in my original project, and that works too.
Not pretty at all, but I'm up and running again.
Related
All.
When i open appsettings.json then start debug, VS will popup a window to select json schema.
I try to pick one in the drop-down list or set the schema in my appsettings.json like:
{
"$schema": "https://json.schemastore.org/appsettings",
"AppSetting": {...}
}
All of them Can't solve it.
Any idea ?
Thanks for reply,
First of all i'm using console app.
My project is a socket client connect to other server,so i set my server connection in the appsettings.json.
I need to test my code to connect with different servers,so i keep open appsettings.json.
And here's the most troubling part: when i start debug VS popup select json schema window and cover up my app window totally !
After i start VS in safe mode, didn't popup again, but i'm not sure the problem has been resolved.
So strange and we did not face such issue before. Try something like these:
1) disable any third party extensions under Extensions--> Manage Extensions-->Installed to check if there is an extension caused that.
2) try to reset vs settings under Tools->Import and Export Settings-->Reset vs settings, and you can also make a backup of your settings.
3) close VS, delete .vs hidden folder under the solution folder, bin and obj folder, then restart VS to test again.
4) use devenv /safemode under Developer Command Prompt for VS to start a pure VS to test it.
5) create a new project to test whether the issue happens again.
6) repair vs or update it if there is a new release version.
Besides, if those do not help, you should describe your issue in detail to share a small sample with us to help us troubleshoot it.
We have an ASP.Net MVC Core project solution in TFS.
And there is an error icon at the top of the solution explorer that says "Package restore failed".
And if I open up the project.json I see the red sqigglies:
"The dependency ... could not be resolved" for several dependencies.
The developer who created this error has since fixed it. And all the other developers on the team get latest and the error goes away.
But it won't go away for me.
I get latest and the error icon at the top of the solution explorer and the errors within the project.json are still there.
I blew away the folder, got latest from Team Explorer, and the errors are still there while gone for the other errors.
Anyone know why this is happening?
I'm stumped. I don't understand what is happening.
First, you could try to do a force update for the specific error fixed changeset.
To force a update, use the "Get Specific Version" command with the
"Overwrite all... " option checked.
You could also clear TFS and VS cache, delete old workspace(back up changes first), create a new one, then do a fresh getting latest files from TFS source control. Which should do the trick.
If the issue still exist, you will have to check your local environment if you are missing some thing. Do a simply compare of the environment with other developers on the team.
It turns out this was a combination of the way .Net Core stores nugget packages and of being in a government environment.
We log into our computer with one account that does not have admin priveledges and this is the one I develop with in order to connect to TFS. But there seems to be a lock on the users folder for this account. So when I start up the solution and project.json tries to resolve all the packages, if one is missing it can't download it and put it in that folder. I then have to start Visual Studio as an Admin and open the project. Then the missing package is downloaded to the nugget package folder under my Admin user's folder. Then I read the resolution failure output at the top of the solution explorer next the the red circle with the X in it to see which package is missing and copy it over. It may be more than one so you have to close VS open back up as the non admin account and look for the next one that fails.
My objective is to get the files in the TFS into my local computer.
The computer I am using has previously been used by someone else, which I assume is the root of my problem.
I connect to the server, and in Source Control Explorer I find the folder that I want to download. I right click it, and a popup with the following pops up:
Source Control Explorer
All files are up to date.
No files were updated because the requested file versions were previously downloaded.
To force an update, use the "Get Specific Version" command with the "Overwrite all..." option checked.
Ok, so I do this, as is also suggested in this question on StackOverflow. It gives exactly the same result. I tried all different combinations of checking and unchecking the boxes.
I also tried to delete the workspace, and cleared the caches for Visual Studio and Team Foundation.
What should I do?
Problem solved.
I was not yet added to my team on the Team Foundation site.
Wierd that I could still see all the code.
I have a problem with TFS
when I connect to a team project and configure workspace and click on Map & Get button, it shows "successfully mapped" message but there is no solution in Solutions panel, there is just a text "there were no solution found"
And when I try to get latest version or get specific version in source control explorer,it shows a message that says "all files are up to date, no file were updated because the requested file versions were previously downloaded" but there is no solution and project in mapped folder
I don't have this problem with other team projects
Does somebody know what's the reason?and what can I do to solve it?
Thanks
Edit
when I click on "map & get" for the first time,as usual a dialog box with title "calculating items to download" appears and then another dialog box with title "get", but in the second dialog box the green progress bar doesn't fill and then the message "workspace successfully mapped" appears in team explorer home and as I said before, there is no solution
To narrow down your issue, you can try below methods:
Make sure your local mapping folder is on a hard disk with enough
space.
Try to Removing the mapping of the project(Right Click your
project→Advanced→Remove mapping) and remap to another folder.
Clear TFS cache and VS cache
According to your above message
In source control explorer under "server-name/DefaultCollection" node
there is nothing
I was wondering whether there is a solution with the project in TFS.
Try to map the project on another computer with another account.
Try to make sure you have enough permissions to get the project.
Check whether you select the right project collection which including
the project.
Check whether your solution and files are in the excluded list of
pending changes.
Probably you deleted the files after you did a Get Latest Version operation.
Try to use the Get Specific Version then check the "Overwrite all files even if the local version matches the specified version".
I finally find the problem. It was related to my access level in team project.
I was the 7th member of the team and because in this free version a team can only have 5 basic and advanced members, automatically my access level was changed to stackholder and as you know a stackholder access level has some limitations.
I have a Visual Studio Solution (2010) containing code projects that were under source control in Team Foundation Server 2010. That collection/project no longer exists, but the code was not removed from the collection. The collection and project have been created over again exactly as it was the first time. When I open the solution in VS, it tells me that it can find my project, it is offline, and asks if I would like to go online. I click yes, but then it errors and says it can not find the workspace. All my files are read only. I assume this is because of the source control and, since it's not hooked up, I can't check them out (remove the read only).
How do I purge the solution of the old and hook everything back up again, short of recreating all the code solutions over again?
EDIT
To clarify:
Collection refers to TFS Collection
Project refers to TFS Team Project
Solution refers to VS Code Solution
The problem is the code solutions are still associated with the team project, which doesn't exist. When I open it, I get the message "This solution is offline, but its associated TFS server is available. Would you like to go online with this solution after it has loaded?" Yes "Unable to determine the workspace for this solution"
When you have loaded the projects, enable the Source Control - Team Foundation Server tool bar, click the "Change Source Control" button (only one enabled) and it asks you if you wish to permanently remove the association with source control.