Create new publish profile: "One or more errors occurred"

Viewed 1887

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.

2 Answers

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