Exceeded retry count of 10. Failed - visual-studio

I am trying to run a sample code and same code was absolutely fine yesterday and Today,It started throwing following error , any ideas to solve this problem?
I tried cleaning. Stopping all processes related to the application , nothing worked :(
Severity Code Description Project File Line Suppression State
Error Could not copy "obj\Debug\TodoREST.dll" to "bin\Debug\TodoREST.dll". Exceeded retry count of 10. Failed. TodoRESTWS
Severity Code Description Project File Line Suppression State
Error Build action 'EmbeddedResource' is not supported by one or more of the project's targets. TodoASMX C:\Users\wadhw\Downloads\TodoASMX\TodoASMX\Views\TodoListPage.xaml 0

Are you working with Visual Studio? This is a known bug, an update was released yesterday to fix it.
You can see the release notes here.
Which say:
Compilation fails because process cannot access dll (after VS2017 update
2 (v15.2))
Although I now see that the error message is slightly different. You can also try this:
Close VS (or whatever)
Go to your code on the filesystem
Delete all the bin and obj folders in each of the project folders
Now open up your IDE again and try to rebuild.

Just delete your bin folder in your project it will work

Related

Visual Studios repeatedly has a PDB API call fail while building project

so I have a project that was housed in another directory that I copyied and moved into another directory in order to dump it into a local git repo that was previously running an earlier version of the code( I know why am I doing this copying stuff well it is a long story and irrelevant). after attmepting to build the project in visual studios 2019 I get the following error during the build.
Severity Code Description Project File Line Suppression State
Error C1090 PDB API call failed, error code '3': C:\Users\chad.lahue\AppData\Local\Programs\Git\TOC\project\TOC\Debug_sim\vc142.pdb TOC C:\Users\chad.lahue\AppData\Local\Programs\Git\TOC\project\TOC\TOC.cpp 1
so after looking up what causes this issue and trying the reboot sugestion to no avail or killing a second msbuild.exe process I have noticed in the task menu that about halfway through the build a second msbuild.exe comes up when building this project and does not on any project that builds successfully
Also the code is the same as well as the project settings as far as I can see from the original directory that it was copied from which still builds just fine.
My question is : 1 is this a code issue / project settings issue or is there some kind of directory or computer glitch?
: 2 has anyone else experienced this type of compiler error and had to resolve it in a more complicated way than what is normally suggested for this error ie. restart computer or kill the second msbuild.exe ? better yet has anyone ever had a project that generates 2 msbuild.exe's during the build process which causes it to fail as it appears to be here?
for others experiencing this issue despite updating their vs like I did the following project settings fixed the issue for me, I have also tried the /FS solution on another project that started experiencing the same issue
For those getting the issue with vc142.pdb try setting "Configuration Properties->C/C++->Output Files->Program Database File Name" to "$(TEMP)vc$(PlatformToolsetVersion).pdb"
It could also work for the other pdb's by setting "Configuration Properties->Linker->Debugger->Generate Program Database File" to "$(TEMP)$(TargetName).pdb".
My best guess is the files are being locked by mspdbsrv.exe due to parallel compilation.
for others experiencing this issue despite updating their vs like I did the following project settings fixed the issue for me, I have also tried the /FS solution on another project that started experiencing the same issue an it seemed to clear it up for good as well.
For those getting the issue with vc142.pdb try setting "Configuration Properties->C/C++->Output Files->Program Database File Name" to "$(TEMP)vc$(PlatformToolsetVersion).pdb"
It could also work for the other pdb's by setting "Configuration Properties->Linker->Debugger->Generate Program Database File" to "$(TEMP)$(TargetName).pdb".
My best guess is the files are being locked by mspdbsrv.exe due to parallel compilation.
I had a similar problem except during my CICD process. I found that removing the pdb files from my repository caused the build process to function correctly since the pdbs would no longer be locked down by the build process.

Error while building solution Arithmetic operation resulted in an overflow - CSC error CS7065: Error building Win32 resources

Got this error while building solution on CI server using VS2019 - 16.7.4
Any idea from where it could come from ? It doesn't happen all the time and only one solution. Can workaround by cleaning completely build working folder
CSC error CS7065: Error building Win32 resources : Arithmetic operation resulted in an overflow
First of all, please enter VS IDE, Tools-->Options-->Projects and Solutions-->Build and Run--> set MSBuild project build output verbosity to Detailed to get the detailed build log to locate the specific error.
If you use msbuild command line, you can add -v:detailed to get the detailed build log.
Then, try the following steps:
1) check every resource files, right-click on every that file-->Properties-->change its Build Action to Resource or Content`.
2) try to use Configuration Any CPU to build your project.
3) close VS Instance, delete .vs hidden folder, bin and obj folder and then rebuild your project again.
Besides, if the issue still persists, please share more detailed build log and description about the issue so that it will help us troubleshoot the issue quickly.
in my case, there was a weird combination of characters in the AssemblyInfo.cs
When I removed all these rubbish and changed that to
[assembly: AssemblyCopyright("Copyright © HP Inc. 2021")]
It built normal

What is fatal error C1090: PDB API call failed, error code '3': vc142.pdb?

I set up a new project with Visual Studio 2019 version 16.3.10. When I try to build I get the following error:
EasyTcpStubs.c : fatal error C1090: PDB API call failed, error code '3':
W:\Dropbox\Me (Mine)\TcpToNamedPipe\TcpToNamedPipe\Debug\vc142.pdb
I have searched the internet and this site for any explanation of this error. Maybe I missed it but I could not find anything.
The project is a Console project.
The error occurs without a line number so it does not seem to be the source. I tried another project and it compiles OK (but it is an old project whereas this error is occuring on a brand new project.
Does anyone know something about this?
For me, I stopped Dropbox and it works. It seems that something is using W:\Dropbox\Me (Mine)\TcpToNamedPipe\TcpToNamedPipe\Debug.
In my experience this error is likely due to some permission error. If your project is in Dropbox, OneDrive, etc, most likely you get this error because your Dropbox cannot sync and update files properly. Restart Dropbox and that should fix the issue.
In My case, I suspect it is some type of race condition/lock issue with the code that opens/closes the *.pdb file. In my case I am running /MP (Multiprocessor Compile) so up to 4 *.cpp modules being built at a time. It works fine on a stand alone build machine. But I'm a vendor and must use a VM environment to develop for my customer, and the disk requirements are so large I must place the builds on a network share.
The latency of file I/O access over a network share seems to be the issue.
Thats all I know about the issue at the moment.
As I learn/test discover more, I can improve this answer.
Synology Drive Client (v3.2.0) caused this error for me. Pausing the sync eliminated the error. Thanks to all for the clue of DropBox, OneDrive, etc. causing the issue.

VS2017 - Build returns D8050: failed to get command line into debug records

I'm using VS2017 (Enterprise) to build a project. I'm pretty new to VS and especially to setting up my machine for a big project, so please do let me know if you need more info.
A while ago, my build was working fine, all cpp files were compiling well. Then I made some changes to a few cpp files (harmless little changes). But after I restarted my machine, I keep getting a
D8050: failed to get command line into debug records
The full error message is:
D8050 cannot execute 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\c1xx.dll': failed to get command line into debug records projectnameC:\Users\username\Documents\reponame\projectname\cl 1
However, this seems to be a really outdated error. I can't find the official support doc for this error (when I click on the error code on VS, it leads me to the support main page) and all the S/O questions are from 3-4 years ago. This question's answer suggests changing the TMP variable, but this can't be found under Properties anymore.
Just fyi, my OS is Windows 8, and my computer shut down abruptly while the project was building (it's a borrowed laptop, battery is old). I'm wondering if that has anything to do with this issue.
Again, please let me know if you need more details (eg logs).
I was able to solve this by switching to a user with admin rights, I had a feeling this was something related to user-permission rights
I was suggested by a friend to do a clean build (clean + rebuild), but this also failed.
What did solve my problem was deleting and reinstalling VS all over again. This reset the program files folder for VS and my build is working again.
I did uninstall McAfee at the same time, because I saw somewhere that antivirus software might be disturbing the build, but I'm not sure if this affected the build.

VS 2015 Xamarin: Warning IDE0006 Error encountered while loading the project

I am developing an Android app using Xamarin.
Visual Studio shows this warning, and I don't know what it means. I've followed the instructions but I can't seem to find the temp\\file
Severity Code Description Project File Line Suppression State Detail Description
Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. daijoubu-app 1 Active To see what caused the issue, please try below.
1. Close Visual Studio
2. Open a Visual Studio Developer Command Prompt
3. Set environment variable “TraceDesignTime” to true (set TraceDesignTime=true)
4. Delete .vs directory/.suo file
5. Restart VS from the command prompt you set the environment varaible (devenv)
6. Open the solution
7. Check 'C:\Users\Noli\AppData\Local\Temp\\daijoubu-app_*.designtime.log' and look for the failed tasks (FAILED)
The full source is available on github.
I just followed the instructions but it did not eradicate the warning,
although I ignored it, it does not appear now.
When rebuilding the project, I noticed it takes a long time because it downloads a zipfile on your %userprofile%/AppData/Local/Xamarin/zips/*
-Make sure to not interrupt the build because it will stop downloading and will cause an invalid zip later on, thus reproducing this issue?
Another hypothesis is that I included a component(referenced a dll) and then deleted it, and then re-added it. (as I'm having trouble with intellisense)
Firstly, it's not an 'Error' it's a warning.
Here's what actually happens:
Visual studio/xamarin check for required sdkbuild tools for your project
If you have it already in your SDK then no problem
If not, your project will show above warning in most of project cases.
How to fix this :
Clean your solution
Rebuild it (at this stage visual studio will automatically try to download zips)
If you get Rebuild canceled error, then close visual studio and start again
At this stage it will definitely download required zips.
Again Clean -> Rebuild -> Build -> Close the visual studio and open it again
Or Simplest alternative is
Download all SDKBuild tools available.
Your warning will be gone.
Let me know if it works, coz its worked for me several times.
I too had both Intellisense and compilation issues.
On my Xamarin Forms and Android project, what worked for me is checking out the Resource.Designer.cs file in my Android project, quitting Visual Studio, and then re-opening it.
Hope that helps somebody.
I had this error also. The error was totally my fault, I was adding some strings to my strings.xml file and accidentally left an empty item in there
<string name=""></string>
This broke the R.java file in a really bad way, as the string/resource didn't have a name/id this is how it was created within R.java.
public static final int =0x7f080060;
As you can see it's missing its identifier. The moral of the story is: check all of your XML for any errors.
i had got this warning for 5 days. i applied this suggestion and problem is end.
to install package: 'Xamarin.Android.Support.[BLABLA]'
unzipping has failed:
Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip
in the C:\Users\[UserName]\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.0.1.3\content directory
Reason: File C:\Users\[UserName]\AppData\Local\Xamarin\zips\96659D653BDE0FAEDB818170891F2BB0.zip is not a ZIP archive
1) Downloading the zip and installing it didn't solve my issues, I got fewer errors, but in general, the messages stayed the same, Please install package [BLABLA], Unzipping failed,...
2) Next I took a look at the zip file they mention in C:\Users\[UserName]\AppData\Local\Xamarin\zips and indeed, 96659D653BDE0FAEDB818170891F2BB0.zip was corrupt. I deleted this zip, did build my project again, and after the build process (this takes a while, leave it 'building': you see your zip reappear and growing to 135MB) all the previous warnings/errors were gone!
Save and close your project.
Go to your path folder.
Move the bin and obj folders from the Android folder to another
location.
Run the project again.
Moving these folders means deleting them and backing them up just in case!
I solved it this way. I hope it helps. :)
I also had this annoying experience, in App2.Droid
"Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled."
... but I seem to have fixed it on my pc.
At certain times when rebuilding my project I also had other errors than the usual ones, telling me
to install package: 'Xamarin.Android.Support.[BLABLA]'
unzipping has failed:
Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip
in the C:\Users[UserName]\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.0.1.3\content directory
Reason: File C:\Users[UserName]\AppData\Local\Xamarin\zips\96659D653BDE0FAEDB818170891F2BB0.zip is not a ZIP archive
1) Downloading the zip and installing it didn't solve my issues, I got fewer errors, but in general, the messages stayed the same, Please install package [BLABLA], Unzipping failed,...
2) Next I took a look at the zip file they mention in C:\Users[UserName]\AppData\Local\Xamarin\zips and indeed, 96659D653BDE0FAEDB818170891F2BB0.zip was corrupt.
I deleted this zip, did build my project again, and after the build process (this takes a while, leave it 'building': you see your zip reappear and growing to 135MB) all the previous warnings/errors were gone!
It seems manually putting the unzipped files in place didn't work because VS was still trying to unzip the corrupt zip file.
This zip file is unzipped after the first build of the droid project. I remember initially I manually stopped the building of the droid project several times because it was extremely slow and it appeared to hang: probably the first build action tried to download the zip file and unzip it,
canceling (I might have even shot down VS one time) that build that took like forever (I had a terribly slow internet connection that evening) corrupted the zip.
Note:
in C:\Users[UserName]\AppData\Local\Xamarin\zips there are several zip files, my error did tell me the name of the right one.
in C:\Users[UserName]\AppData\Local\Xamarin\Xamarin.Android.Support.Design I had several 23.X folders, one with content in its 'content' subdir, and one without: the 23.0.1.3 one, as specified in the error texts.
Edit: basically what #trycatch answered, his first option is confirmed ;)

Resources