Access to the path '/iPhoneSimulator/Debug/ibtool-manifests' is denied - c#

I am developing an IOS mobile application. I am using Visual Studio 2019 for the development and use iPhoneSimulator to test the application, after connecting to the mac device. Suddenly I am getting an error as preceding.
MessagingRemoteException: An error occurred on client Build162090 while executing a reply for topic xvs/Build/16.2.0.90/execute-task/Sprint.SESAT.iOS/a303cd7002fIBTool
UnauthorizedAccessException: Access to the path '/iPhoneSimulator/Debug/ibtool-manifests' is denied.
IOException: Permission denied
Anyone ever faced this issue before, I am 100% sure that it is not related to any recent code changes, thus providing codes wouldn't help here.

I was actually sure about that this has nothing to do with my recent code changes, thus I did the preceding things first.
Clean the solution and rebuild
Delete the bin and obj folder manually and then rebuild
But I was getting the error again, the only thing which worked for me is restating the visual studio and open the project again. Hope it helps.

Related

Error The file 'Resources/LaunchScreen.xib' conflicts with 'Resources/LaunchScreen.xib'. ios xamarin

I am working with a Xamarin application where I have already built both IOS and Android applications. I am using Visual Studio 2019 for the development and use iPhoneSimulator to test the application, after connecting to the mac device. Suddenly I am getting an error as preceding.
Error The file 'Resources/LaunchScreen.xib' conflicts with 'Resources/LaunchScreen.xib'.
Anyone ever faced this issue before, I am 100% sure that it is not related to any recent code changes, thus providing codes wouldn't help here.
As I was sure that the issue is not related to the recent code changes. I did the preceding things first.
Clean the solution and rebuild
Delete the bin and obj folder manually and then rebuild
But I was getting the error again, the only thing which worked for me is restarting the visual studio and open the project again. Hope it helps.
I get this error a lot, or various other errors that seem to be related with items being duplicated. The easiest fix is to just disconnect from the Mac and reconnect. This is assuming that you are developing on a PC and pairing to a Mac. I suggested to the developers that they simply include disconnecting and reconnecting as part of the build process until they can figure out the actual cause.
If you are on the actual Mac, the process that Sibeesh Venu describes may be what occurs each time Xamarin pairs with the Mac.
The developers asked me, and others that have reported this issue, to turn on diagnostic debugging so that they can be provided with a log for when it happens. I did this, and noticed that it occurs less frequently for me. This makes me suspect that it's related to timing when files are processed.
https://github.com/xamarin/xamarin-macios/issues/6770#issuecomment-575310911
I encountered this same issue after after doing a merge in source control. It turns out that there was a duplicate instance of the .xib registration in my iOS.csproj file. In other words, there were duplicate lines that looked like this:
<InterfaceDefinition Include="Resources/LaunchScreen.xib.xib" />
Once I removed the duplicates, everything worked perfectly.

Visual Studio Web Apps Publish fails - no errors

I have several ASP.Net web form apps in a Visual Studio project. In one of the apps, I was working to add a test page for some additional features we wanted to test before adding to our main pages. Afterwards however, I was trying to publish to our server, but keep getting a message box saying: "The publish has failed due to one or more errors.".
Build succeeded Image
Publish Failed Image
I checked the errors, but none are given. The build was successful and other then a few un-used references, there are no other indicators on what the issue exactly is. We have a few other projects that normally allow for publishing without issues. So I don't believe the issue is from Visual Studio, but I am not completely sure. I'm using Visual Studio 2015 version 14.0.24720.00
Figured it out!
There is a Thumbs.db file that was auto-generated in the images folder. I decided to go through the output window line by line to see if I could identify where the publish was failing at. I noticed a line that said the /Images/Thumbs.db file could not be published and that access was denied.
Doing some more online investigating, I found some other questions along the same line as the premise for this one. Specifically the question here was most helpful. Tammy Spencer's (#user:973679) answer to try and delete the file was what made the publish succeed. So thank you Tammy.
In addition, the Thumbs.db file wouldn't let me delete it at first. But after doing some more searching, I found this YouTube video that made the file deletable.

Getting visual studio error An exception occurred while invoking executor 'executor://mstestadapter/v1': Could not find a part of the path 'C:\'

I am getting error upon executing debug test on my visual studio as following code.
Getting visual studio error An exception occurred while invoking executor 'executor://mstestadapter/v1': Could not find a part of the path 'C:\'.
I have used different computer and it works fine. Its only my computer is showing above error. I have also installed fresh copy of Visual community.
Does anyone have similar issue before? How to resolve this?
Such problems can be a real hard-brainer so lets try to collect all pieces before going deeper.
I guess you do not really try to access some files directly on "C:\", am i right?
Can you give us some code?
Are you using the [DeploymentItem] attribute (right)?
Do you have the right write privileges onto the directory you are trying to access?
Are you targeting the right version of the "Microsoft.VisualStudio.QualityTools.UnitTestFramework". Compare the string you are using in the App.config with the version displayed in the propoerties windows when inspecting the according reference in your solution.
Try to run the following command from the console in your debug directory:
"PATHTOVSTEST\vstools.console.exe" yourtest.dll you.exe
I've found the executable here:
C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\
Let us know if anything of the suggested things got you closer to a solution.

C# - OleDb Exception while running published .exe

I'm working on a C# project. While running it in VS2013, it shows no error. I'm using MS Access 2010. But after publishing the project, clicking any button that involves database process, .exe application shows OleDbException.
OleDbException : Use updateable query.
But it works perfectly on VS2013.
My Connection String : Provider=Microsoft.Jet.OLEDB.4.0;Datasource=|DataDirectory|\\Resources\\GreenTrends.mdb;Persist Security Info=True
Thanks in advance!
Make sure that the user running the process has appropiate read/write permissions to the database file. The error message as such can be a bit misleading since its often missing permissions causing the error. For more information please refer to this SO answer

Visual Studio 'Publish' command fails

I'm working on a moderately sized WebForms project. Due to the peculiarities of management here, I have to upload the site to a remote server in order to test (no localhost testing). I'm using the 'Publish' command in Visual Studio 2008. Sometimes, it even works. Most of the time, I inexplicably get a "publish failed" in the bottom left corner, with no further details.
The few googled articles/forum posts I read suggested making the target local folder for the publish operation readable/writable for everyone. Doesn't help.
Is there are way to get further details as to WHY a publish fails in VS2008, and if not, is there a better way of doing these deployments? I'm spending more time building/pushing to the web server than actually debugging.
It's worth checking the output window. I've just had a publish fail because I had deleted an image outside of VS so VS was complaining that the image couldn't be found, but this information was only displayed in the output window.
See this link for more information:
http://ericfickes.com/2009/08/find-out-why-visual-studios-publish-fails/
It happens to us when there is an error in markup (!). Bad thing is that VS will just swallow the error and just tell you Failed.
What I suggest is to run your publish from command line using MSBuild. It's not that straightforward but it works (once you get into it).
I've since discovered that the reason for these particular publish failures was due the "Delete Existing Files" option being checked. Using Visual Studio 2008 under a non-administrative account on Windows Vista could cause a permissions error while attempting to delete the existing files. The publish would fail silently after encountering a file that Visual Studio had insufficient access to delete. Once the files were deleted manually outside of Vidual Studio, the publish functioned normally.
I have not had this issue with Windows 7; I assume the UAC changes in Windows 7 fixed the problem.
I mostly work with Web Forms, and I encounter this problem daily.
It seems to me that publish fails when it fails to delete a file it is trying to replace. Even if I don't have any files open, it still fails sometimes. Not sure why.
Not only VS publish fails very often, it is painfully slow as well.
I just publish to empty local directory and use separate FTP client to upload files. It's more work, but works.
This is probably not the case for you, but I've seen this happen when I'm publishing a web site. If the app_offline.htm file is not excluded from your project (if you use this file), the publish will fail.
Same happened to me.. what I did was include images files that was not included in the project and delete images that were not used.
After struggling with a similar issue for about 30 mins with no clue as to what was causing it closed down VS and reopened my project. Started working fine. No idea why but it worked.
You should always stop the IIS instance running on the machine your are publishing to. Google the word "iisreset". Other hosting providers like DiscountAsp and Arvixe offer you tools to "Stop" and "Start" your app pool on their IIS remotely. This is very necessary because IIS may have locked some files as "in use", so your publish fails when it tries to write over them. When your publish is complete, then just restart IIS (or press "Start" from a web tool if you're using a 3rd party hosting provider).
When all else fails, check your "Output" window (the tab to the right of your "Error List" at the bottom of Visual Studio). Scroll through all of it after a failed publish and look for anything that says "Unable to add". If you keep seeing the same "Unable to add" errors on the same publish, then ftp into the folder, delete the the problematic files manually, and try publishing again.
I got this when my ProjectName.Publish.xml file was read-only. Once I checked the file out of source control, I no longer got the error and could publish.
Just to add to this thread, I found that, for some bizarre reason, only the Mercurial files were being published to the server, everything else just wasn't being copied across.
Another strange thing was that only the Debug configuration was available; Release was nowhere to be seen.
After reading other threads around S.O., I found that there were many for VS 2010 and 2012, but not much to cover the same problem with 2008.
The fix, I found, was to delete the [solution].suo file and then attempt a publish. That seemed to do the job, though it took a long time to complete.
What I found and work in my case. It is to use a different version of VS.
I recently had the problem, the solution works perfectly in VS2015 build, compile and tested.
However, when I try to publish was failing silently.
So, I closed the solution and open it with VS2017 that use the same file structure for the projects/solutions. Then rebuild it and publish without any problems.
I believe it could be VS related and it is complicated to debug.
This is a workaround if you work with multiple Vs instances in your local machine.

Categories