Resolved Publish failed. Check output for more details.

chairmanPC

Active member
Joined
Apr 19, 2021
Messages
38
Programming Experience
10+
I worked on my project on another computer. When I transferred it to my work laptop to continue working on it with a USB Drive, it built fine.

But when I tried to publish it to my Documents folder, I get the error message below:
1625716581113.png


How can I fix this issue? I am stuck here! Thanks for any help!

Here is the dump file:
8/7/2021 12:03:02 pm
System.AggregateException: One or more errors occurred. ---> Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details.
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details. <---

Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details.


===================
It's a Winform project., and the project built and published totally fine on my first machine. Is this information enough? I never really mentioned anything about "public" here.
 
Last edited:
Solution
Guys, I've solved the problem.

It seems that I did not set the framework to .NET 4.8 before publishing the project on my work computer, thus triggering the publish error. Just set the target framework with a click of a button in the publish area, and you are good.
That would indicate that your process of transferring your project from one computer to another has some gaps in it because the target framework should be in the files associated with your project. Again the recommendation above about using source control would have rescued you if you had let Visual Studio determine what files to add to source control.
 
Yeah, you may have solved this immediate problem like that but who knows what other issues are lurking? If the target Framework didn't come across in your "copy" then what else didn't? If you had simply copied the solution folder then there's zero reason that the target Framework shouldn't have been maintained so what else might be different on the second machine?
 
Always check the output window for the actual error message, sometimes, it's due to wrong password if your are deploying to a host server on the internet, low or no internet connectivity , sometimes low storage space on your computer
 
Back
Top Bottom