Xcode 4 stuck on "Scanning for working copies" - xcode4

I just archived and submitted a project. When I go back to open the project it hangs on "scanning for working copies." I can navigate around but am unable to view the project files.

It is really just a linking problem.
Select your project and make sure you have 'Identity and Type' open. This is in the right side Editor bar(toggle open and closed with 'View' button).
You can change your Location and Full Path there. You just need to check that your project is linked to the correct directories.
Hope this helps anyone.

Copy and delete the whole file and paste it in some other directory (or I guess you can put in same directory). Now open it again. I also had same problem. Actually my project was in SVN, so I deleted the directory and again checked out the entire file and opened it again. Now at least that error message is gone.
I am also new to xcode(4.3) .. sorry if my english is not good ...

Open up a more trusted Source Control App, like SourceTree, and refresh all of your working copies, then Xcode, will behave.

The problem seems to result from incorrect linking or damage to the version control repository. Other answers suggested deleting the repository or removing it from xcode under the Window -> Organise menu. I suggest you try these options and the suggestions in the other answers. However none of these worked for me and my xcode was still displaying the "scanning for working copies" message and intermittently locking up.
Deleting xcode from the Applications folder and reinstalling it from the app store then importing my project fixed the issue for me. I also suggest you dont use version control for your project unless you really need it.

Related

How to solve this error? - 'Resource.Layout' does not contain a definition for axml file

Am new to Xamarin and is currently building a very simple app using the tutorial from Youtube. Am just in a middle of the video when I got this error even tho I carefully followed all instructions. And even the instructor in the video was able to run his app successfully
Here's the code where I'm getting the error:
var view = inflater.Inflate(Resource.Layout.SignUp, container, false);
For me it is caused by namespace changes. After I corrected the namespace in project properties, then I can build again
I just deleted my newly created axml file, rebuild, add it again, and this time, clean and rebuild.
Everytime I added a new axml file, I clean and rebuild. That's all, thank you :).
Actually this problem occurs when your ResourceDesigner.cs file has not yet mapped the file that you added to your resource directory.
The easiest way i would suggest to handle this situation is you comment the code you are trying to write and clean build your project and it will work like a charm.
Good luck!
In my Resource.Layout.toolbar, Resource was ambiguous between Android.Resource and Xamarin.Forms.Platform.Android.Resource. Instead the one that works for me is [Project name].Droid.Resource. Clean, deleted bin/debug and now it's fine
Resource.designer.cs was excluded from project. Solved by including back.
In Xamarin.Android this problem can be resolved by saving other axml/xml file. Many times cleaning solution, deleting bins/obj doesn't working for me.
In my case my Main file was configured in the Build Action as AndroidResourceAnalysisConfig and then change property to AndroidResource then Build my project and it works.
I had a lot of "XXX" does not contain "XXX" errors like this after a git reverse operation. Very annoying.
I tried all the solutions I could find, all without luck. Finally I magically fixed it by going to the Android project properties, Android Options, then unchecked "Use Fast Deployment (debug mode only)". I then built the project and it worked. Then I went back and checked that option so it was back to normal, and everything is fine.

Qt : no rule to make target after deleting picture

I accidentally permanently deleted one of my picture files today (it was added to the Qt resource file earlier) through File Explorer (not deleting it via Qt Creator). Now whenever I try to build my project, I keep getting a message that says:
No rule to make target "mypic.png" needed by "qrcfile.cpp". Stop
What can I do to fix this problem ?
So I think I found the solution to this. All I did was clicking Clean all, then Build All, then Run qmake. After those steps, I tried running the project and it worked!

Why Files misteriously disappear from xcode with this strange symptom?

I use time machine and drop box to synchronize stuffs.
Recently I found that some files are gone.
However, the project compiles just fine as if the file is there. My friend cannot compile though.
This is very frustating. I got to find the missing files and then restore it from time machine and then readd that to xcode. I don't even know what files are missing.
I used dropbox and time machine. Looks like file disappear, the file names becomes "red" in xcode for a while and then poof it's gone. Xcode automatically remove the files from the project. The project still compiles fine which is frustating. If the project doesn't compile, I will know ah this file is missing.
Looks like somehow xcode still have the file but doesn't show it. Files is not on finder either.
What could possibly be the explanation and how to fix that.
I have clean projects to make sure that my computer do not use cached files.
It still compile fines in my computer
The file is still missing in project navigator
My friends' computer that uses the EXACT same files (connected to drop box) cannot compile
For example, xcdatamodeld files are crucial. In my computer it still run fine without that file even though that file is obviously needed. Xcode behaves as if the file is there all along.
My friends' try to compile the project and crash.
Also there is a PNG file. In my computer it runs fine with the icons showing up. In my friends computer the icons doesn't show up at all.
For anyone who still have the problem, in my case Xcode6. It turns out somehow the "Show only files with source control status" and "Show recent file button" is enable. It located in the bottom of left sidebar.
This somehow happen after I update os to Yosemite.
Cheers
Go to the project navigator (top left folder symbol). Files that are not found by XCode are displayed in red. But since your project compiles fine, there should not be any that are required. Now click one of the "missing" files to activate it. Open the utility area on the right side, and show file inspector. Under "location" you find the full path of this file. Probably, your XCode project uses just references to these "missing" files that are stored somewhere else, and not in your project folder.
I had the same problem ..then I added the files explicitly into our project…which resulted into Duplicate Symbols error …we solved that by following….
In Your Project go to targets-
At the bottom Bar of your Targets there are three options..
1.Add Target
2. Validate Settings
3. Build RUle..
Click on validate Settings….it will ask for you to remove the Duplicated files from the project do it…ur project would run fine

How to map and opening ASP.NET solution file in TFS?

What I"m trying to accomplish is to get the latest solution from TFS Team System Foundation, build and debug it. I can map the solution to my local folder but when I try to open it I have an issue where I can't build and debug it. Here are the steps I"m taking:
Open Visual Studio 2010; Open Team Explorer (using TFS2010) window; Open Source Control Explorer window
Navigate to solution directory example: $/WebSites/English/Development/Source/WebApp
Right Click Map to Local folder
Select folder; click yes to get files and wait for file to be moved to local folder
Open Windows Explorer, navigate to folder with sln file
Double Click sln file to open it
• What I would like to occur is to have solution open; build and debug it
• 7. What occurs is another Get Progress that gets all files again and alters the file structure in Windows Explorer
Then when I attempt to run and debug the solution it doesn’t have all the files. For example in the browser when viewing the site a lot is missing, it’s not rendering correctly.
On a co-workers machine it works just fine.
Why doesn’t the sln file open correctly?
How can I open the solution to build and debug it?
Thank you in advance,
Catto
Ill assume you are doing a get latest version before you do this.
here are some things to check.
First expand the references for all the projects in the solution and make sure they are all correct, the icon will be different for anything missing.
Make sure the web settings are correct, they can be saved in the solution file or not, its an option.
Make sure there are no pre or post build events that are screwing things up
make sure someone didn't flat out forget to add the files to TFS or maybe they didn't check things in yet
if all that doesnt help make sure the versions of your referenced dlls are the same as your coworkers ... and the GAC if its being used

'Publish failed' but build succeeded?

When using Visual Studio 2008, when I "Publish Web Site", the application builds correctly, but then I get a "Publish failed" message:
What possible reasons are there for this, and how can I prevent it?
I had the same issue. Nightmare to identify the problem, because the logs and outputs show no errors or failures. I simply get "Build: 39 succeeded" and "Publish: 1 failed".
I resolved the problem by systematically removing all NuGet packages one at a time (and removing code that references it) until I identified the offending one.
This takes a LONG time!
However, the answer for me was Microsoft.Net.Compilers.
No idea how I ended up with that in my project, but as soon as I removed that package, everything publishes fine again.
Edit - For what it's worth, this problem occurs on VS 2008, 2012 and 2015 but does not occur on 2017.
You can try this:
Perform precompilation against the web application.
Clear the target directory(virtual directory in IIS or physical file
folder) and deploy all the files (of the web application) into the target
directory.
In the output window you can check at which stage does the publish website
operation fail. For example, at the first stage, if there are some error
which will only occur at precompilation, that will cause the stage 1 fail.
Or some times if the target directory has something configured incorrectly.
Such as the IIS virtual dir is not set to the correct ASP.NET version or
some old files are locked and prevent them from being cleared. Mostly,
publish failed will be caused by IIS side configuration issue such as
authentication setting....
Source link
You can open the output window by pressing Ctrl+W, O.
Sometimes it's because you need to be running VS as Administrator to be able to write to the target directory.
Check the Output messages, they should help you solve the problem
I had to copy project to C:\a\ and than publish. I suspect problems with long path. Strange, but worked for me.
The conclusion is: Try another VS edition and see if that does it.
Here is what did it for me.
I have VS 2013 Pro and Visual Studio 2015 Community. I sort of use one or another to work on my MVC project and all was fine. Then all of the sudden VS 2013 could not publish though it would build just fine. There was no erros other than some silly ...code is not returned from all paths...
So when I open it in VS 2017 - it published the same project just fine. I am suspecting a compiling issue - because that was the stage it would fail at.
Hope that helps you save a bit of time.
Not sure if this happens in different versions of Visual Studio, but at least in 2015 Professional Edition, the problem arises when we try to update all Nuget packages from the solution using the Packages Manager.
As pointed out by #SimonGoldstone the issue is caused by the package "Microsoft.Net.Compilers". By default, the package gets added to the solution while creating a new web application. The default version 1.0.0 does not introduce any problems. I was able to keep testing with latest versions until 2.4.0 and everything works fine, but from 2.6.0 henceforth is when it all starts. If an update is strictly required, I would recommend updating the aforementioned package until version 2.4.0. After doing some research, seems that some bugs on later versions than 2.4.0 are introduced and not fixed on the long term. What is curious though, is how this problem gets included on Nuget with no basic quality control checkpoint.
There are many proposed solutions for this. I think they are overcomplicating the issue.
I found the following worked for me:
Locate the obj(Release or Debug) folder in your solution
Inside the Release or Debug folder delete the CONTENTS of the 'AspnetCompileMerge' folder
Now try and publish.
Make sure you empty the target folder (manually) before publishing. Sometimes vs cant delete a file which will result in a failed publish
After trying a Rebuild, having other Projects in my Solution able to publish correctly, and changing my publish location to the C: drive (locally attached) instead of pushing to a mapped network drive, I was still having an issue where the only error output said:
========== Build: 5 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
My solution is targeting x86, but I think during a Git Merge, this project had it's profile switched to Any CPU. After creating an x86 profile for the project and having it match the target of the publish goal and of the active solution configuration, I was able to successfully publish again.
Check Project BIn directory. there must be a DLL of your page or control. which has to be recreated during publish. So exclude it or remove it
I ran into this same problem today and it was due to the Thumbs.db file that was created when I opened my images folder to look for an image. I deleted the file and the project deployed successfully. Hope this helps someone else in the same situation.
Delete publish profile and create another one . Worked for me
In my case, I was publishing to a directory in a mapped network drive, but the Output panel/window was indicating that the location didn't exist. The path was correct, and the drive was fully accessible. The problem resolved itself when I re-set the path to publish to in Visual Studio by using the ... button.
With me it was simple - the dist folder was locked. I unlocked it by an unlocker and the publishing resumed.
I have several user controls that are registered in the web.config, and have a ClassName in the .ascx file header. For normal builds everything works fine, but with a publish those class names were not recognized anymore. At some point I found out that the errors were not in my regular code files, but in copies in a temp directory for publishing.
I had "Precompile during publishing" turned on (to be found under Settings > File Publish Options). Turning that option off worked for me.
I had the same issue with VS2017 with a website project. Build worked, but publish gave me an error:
Error CS0012: The type 'System.Net.Http.HttpMessageHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
All my projects already had a reference to System.Net.Http so it was really confusing.
To fix it, I had to copy System.Net.Http.dll into my website project / bin folder so publish could find it and copy it to my web host. I found System.Net.Http.dll by looking at another project's references (a class library), then System.Net.Http.dll Properties, and seeing the path (C:\Program Files(x86)\Reference Assemblies\Microsoft\Framework.NetFramework\v4.6\System.Net.Http.dll).
i know iam late but i think it should use for someone whos searching for this query.
just uninstall all your nuget pakages , then clean and rebuilt solution ,
now click on publish , sure it works and u will see publishing starts and works correctly now
If any one had changed the version of the project file and related framework. then this type of issue happened.
please go to "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VisualStudio\v16.0\Web" location for visual studio published and build setting -> edit -> comment the force copy of all file section.
I had one file that was not found. I had copied in a png file to replace a jpg in the content folder , same name except filetype extension.
Project built fine, but refused to build and publish . changed extension of file so it could find that file name and it worked - no errors amazing 1 thing wrong and everything else is an error.
The case for me was that Visual Studio was not signed in to Azure, but provided no indication of that. I edited the publish profile, clicked "Validate Connection" then clicked "Save" and then it worked.
I was working on a feature branch, which was failing. Switched to Master Branch, deleted the feature one and created another one. It worked.
What caused my issue was a little different, but has similarities to some of the reasons stated above.
I managed to trash my local copy of a given application and did a GIT hard reset to get the most recent from the repository in question. This in turn, wiped out the web.config file (which was not stored in the GIT repository for various reasons).
This cause configuration information for various NuGet packages to be "lost" (since it was stored in web.config).
Fortunately, I had "backed up" the web.config, so once I figured out it was not out there (a migration failed because I was unable to connect to the database), I was able to replace it.
Tried the publish again, after fixing the web.config, and everything worked perfectly.
If you are opting for the "Delete all existing files prior to publish" in the publish web dialog box, then make sure that the Visual Studio is started with Admin rights. Right click the Visual Studio and click Run as Administrator. Hope this helps.

Resources