The problem with inability to Publish in Visual Studio 2010 and other versions is associated with behavior of new Windows versions, such as Win10. Even using Admin rights you find that you cannot set the Project file folder, on the C drive, to anything but Read-only using the File Explorer. The files that appear to be locked as Read-only causes the Publish wizard to fail in Visual Studio 2010, for example.
An easy approach to get around this trouble, adding to the notes above by others, try these actions:
Save your Visual Studio work.
Close the Visual Studio application.
Copy your project folder to another drive (not C).
Use Windows File Manager to right click on that copied file folder. Select the Properties. In the Properties panel, Un-check Read-only for the folder, and subordinate folders. Press the Apply button. On the popup panel, press OK to apply changes to this folder, subfolders and files. You should see a progress bar as the file permissions are being reset for all the underlying files and folders. Strangely, if you reopen the Properties of that upper folder, it will still show "Read-only" as checked, even though you unchecked it. Don't worry about that; the files in the folder can be changed by the Publish wizard, as it expects.
Launch your Visual Studio application again.
Open the project copy from the folder that is off the C drive.
You may try to pull down the Build menu item and find that some key lines like Publish are disabled. To resolve that, you must first Run the application from the Visual Studio. This seems to be another issue in Visual Studio, as it will disable the Publish button and other buttons until you Run the application first.
After that runs successfully, the Publish button should now be active, and should work properly.
Hope these notes help you the Publish capability back to your Visual Studio version.