VS2012 Error when creating publish package: Exception in Executing Publishing Access to path is denied - visual-studio-2012

I am trying to publish an application with VS2012 and when i try and make the package i get an error that access to the path is denied. I have checked and my user has full control and verified the path.
VS is trying to access .pubmxl file that is there.
I have also tried running VS2012 as administrator.

I had this same issue (VS2012: Access to path is denied when executing publish) and found a way to allow Visual Studio access to the file.
If you open the pubxml file in Visual Studio, make an edit, and save the file, Visual Studio is able to successfully publish using that file. Hope this works for you too.

Creating a new profile worked for me. I got this error when I tried to change the path of an existing profile, and Unfortunately I could not find the original pubxml file, otherwise I would have simply copied it to the new location and followed advice #1 (edit the file in location from VS2012). It's easy enough to create a new profile as there aren't many settings anyway.

I have experienced this issue and I noticed that the files were "Read-Only". Selecting the files and removing the "Read-Only" attribute allowed me to Publish successfully.

Sounds like TFS feature rocks again. Remove publish profile from local repo and get latest version afterwards, then you should be fine.

I had the same problem and fixed it by removing my Publish profile and creating a new one.

Related

Assembly information - The system cannot find the path specified

I have absolutely no idea, what does it means? I only press OK in assembly information in order to specify Assembly Version.
What paths is absent? And what operation VS2022 can not finished? It looks as Visual Studio programmers what is useful error messages are.
I just ran into this problem and for me it was a VB project, and when you modify the AssemblyInfo, it tries to write the AssemblyInfo.vb file to the .\My Projects\AssemblyInfo.vb. Normally when you create a fresh project, I think this folder is created automatically so VS assumes it's there and gives you this error if the folder is missing.
In my case the folder was not checked in to git, so when I checked out the project the folder was not there. I would assume the same is true for c# projects, except the folder expected would be .\Properties\AssemblyInfo.cs.
All I had to do was create the "My Projects" folder at the root of my project and the error went away. It appears you are using c#, so try creating a "Properties" folder at the root of your project and see if the error goes away.
I still don't understand what path Vs2022 can not found and what operation VS2022 can not complete, but manually add CS-file with needed attributes solve this issue.

Visual Studio Team Services build error cannot copy AssemblyAttributes.cs

After adding a web role to my Azure project I get a build error within my Visual Studio Team Services environment. Though, I cannot figure out what is causing this. Where is AssemblyAttributes.cs comming from? I cannot find this file in my solution folder.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Windows Azure Tools\2.7\Microsoft.WindowsAzure.targets (2787, 5)
Unable to copy file "C:\Users\buildguest\AppData\Local\Temp\.NETFramework,Version=v4.5.2.AssemblyAttributes.cs" to "C:\a\6e05cef4\xxxx\xxxx.Backend.Api.Azure\obj\Debug\Tijdmunt.Ui.WebRole\C:\Users\buildguest\AppData\Local\Temp\.NETFramework,Version=v4.5.2.AssemblyAttributes.cs". The given path's format is not supported.
AssemblyAttributes.cs is a temporary generated file created by MSBuild, so It's not going to be on your solution. Instead it is going to be under the temporary folder.
Since It's a temporary file and created on every build, I just went to below location and deleted the file, then my solution started to be successfully building again.
C:\Users\UserName\AppData\Local\Temp.NETFramework,Version=v4.5.AssemblyAttributes.cs
Hope this helps someone else.

Access is Denied when trying to add a resource to C++/CLI project

I am trying to add a resource to my C++/CLI project. I am working with Visual Studio 2012. TFS 2013.
Right Click on the project => Add => Resource => I get the error.
Error:
The operation could not be completed. Access is denied.
I do not understand why I am getting this error. I don't know how to fix it. So far:
I checked-out the entire project (Project and all its files)
I removed the "Read-Only" mark of the folder and all the files inside it.
I can add other files and edit everything, but for some reason I can not add resources.
I can edit the resource file in Notepad, so I don't know what else to do. (I even rebooted just in case).
I can add resources to a C++ Native Library I have in the same project.
What else could be causing this error?
This happened to me because I had still opened the resource (*.rc) file in the Resource Editor and/or Text Editor. As soon as I closed it, I was able to add resources again.
It seems the Resource file was somehow corrupted. After trying different approaches, I kept getting the same error, while I could easily add resources to other projects.
I deleted the resource file and everything related, and created everything from scratch and it worked.

Can't get workspace project to reflect latest changes tfs visual studio

After using a "GetLatestVersion" to retreive my coworker's new project added to Source Control, we realized that the folder structure was incorrect. He deleted the issues on Source Control and everything looked great there. It runs on his end.
Unfortunately for me, even after running the "GetSpecificVersion" and checking all the overwrite boxes, I cannot get the new version of his project on my local workspace.
Ok.
How now do I delete the project on my end without TFS knowing (so I don't have toCheckInanything and TFS doesn't think it needs to bring anything onto the server from my local workspace).
It makes most sense to me to:
- log out of Source Control, close the project and Visual Studio,
- go into my workspace folder and delete the coworker's broken project
- log back into Source Control, bring up the workspace project in Solution Explorer, and re- "GetLatestVersion" and overwrite files.
Has anyone had this problem before? I'm working in VisualStudio 2012
Are you 100% positive that your co-worker did in fact check in all of his changes that "fixed" it? I would start by double checking that. In team explorer, make certain that they do not have any files that need to be checked in under "Excluded Files".
If you have a TFS Build Server, make certain that the CI build (or you can manually run it) was successful. This will at least prove whether TFS has the project buildng correctly.
If you don't have a TFS build server, have another co-worker pull it down to verify that everything got checked in correctly.
If you are sure that they checked in everything ok and it is still not working for you, try pulling it down to a different directory. Also, you can manually delete your copy of the solution through file explorer and then pull it down again (with the overwrite checked).

Publishing a Web Application from VS2012 is wiping out user content

I'm attempting to use Web Deploy to Publish a Web Application.
I want Visual Studio to delete any files that no longer exist, so I've checked the "Remove additional files at destination" setting in my Publishing profile.
However, I want VS to ignore the /Content/uploads folder, as it contains contents that my users have uploaded. Naturally, the contents are different in my development site than they are in the live site.
Unfortunately, I have been unable to discover a way to make Visual Studio ignore this folder when publishing (it wants to delete all of the content, since it doesn't exist in the project).
Does anyone know of a way to exclude specific folders on the target site from being examined by Web Deploy?
I had a similar problem, wanting to keep some files in the deployment package even though they're not part of the project.
Try to create a custom MSBuild target for this, that works for me.
Here is a Getting Started MSBuild reference
Hope this helps.
All the best.
I was unable to find a suitable solution for this issue, so I've created my own:
https://pubsync.codeplex.com/
PubSync enables quick and reliable file syncing for publishing Visual Studio projects.

Resources