How do I specify an installation location for Xcode 4.1 from the Mac App Store? - xcode4

I just installed Lion, and downloaded Xcode 4.1 from the Mac App Store. I like having my Xcodes installed in /Developer directories that have their Xcode versions appended (e.g. /Developer-xcode3.2.6). Downloading Xcode 4.1 from the Mac App Store just gives me an installer app, which does not allow me to specify an installation location, as Xcode installers did in the past. When I ran the installer, it asked me to move old Xcode 3 installs out of /Developer, so is just renaming the /Developer directory sufficient? Will that break stuff?

Locate the 'Xcode Install' package. Show package contents. Inside the Resources folder you will find Xcode.mpkg. Install as usual.

renaming the folder should be enough but, yes, it may break stuff if you continue to use xcode 3. “it may” because you will still have a “/Developer” folder which will contain tools xcode use. if they (the tools) don't change too much between xc3 & 4, you shouldn't have any problem.
but stick with xcode4 and you won't have any problem at all.

Related

SDK "Microsoft.NET.Sdk.Web" is missing

i copied a project from one computer to another. If i open the Project i get a error-message "Das angegebene SDK "Microsoft.NET.Sdk.Web" wurde nicht gefunden." Tanslate: "SDK ..Web not found".
I searched in another questions like here. But i don't have a global.json and i don't know, where i must place it.
And i think the problem is another where. on source computer, the solution can be load. only on target computer i can't load.
Edit: I installed the latest Update of Visual Studio 2017 Community
In the VS installer, make sure you selected the workloads for cross-platform and web development so the required components are added to your VS installation.
I had some different Versions of Core installed. But only the oldest one was used. The command dotnet --version shows me the problem. After deinstalling the old version, i can run my app :).
I had already uninstalled some out of date SDK versions. It turns out that left a dotnet.exe with no related sdk folder at C:\Program Files (x86)\dotnet\dotnet.exe. My machine like most is 64bit and newer sdks are installed at C:\Program Files\dotnet. The cmd path was preferring the older version. I renamed the folder C:\Program Files (x86)\dotnet to C:\Program Files (x86)\dotnet.old (I'm not 100% sure something doesn't crop up that needs the files there so just to be safe). Everything then works.

How to open project files with Xcode 4 by default while having Xcode 5 installed alongside

Xcode 4 is still my main IDE for iOS development. To try the upcoming iOS 7 I installed Xcode 5 Developer Preview and now all the files that were used to open in Xcode 4 now open in Xcode 5.
How can I revert Xcode 4 to be default editor again without uninstalling Xcode 5?
After reading about LaunchServices in OS X I have finally found the solution, thanks for the hint #peter-m.
To modify files association for certain app one can use lsregister tool. So to re-register the app there is -f parameter, and to unregister -u. Everything can be in fact done with just one command:
$ lsregister -f /Applications/Xcode.app
Or if you want to unregister Xcode 5 and not touch manually set associations earlier:
$ lsregister -u /Applications/Xcode5-DP5.app
lsregister is located in /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/, so add it to your $PATH
Re-login to OS X for changes to apply.
Assuming you don't have any Xcode 5 projects yet, how about manually:
Find an existing XCode 4 project (*.xcodeproj) with the Finder
Do a Get Info of the file
Change Open with: to your desired version of Xcode
Click on Change All
Repeat for all types of files that you want to open with XCode 4
Or if you want to try something more automatic take a look at: programmatically-script-atically-changing-the-default-open-with-setting
Based on the comment below, the problem seems to be with command line builds picking the wrong version of Xcode. In that case I suggest looking at: xcode-build-and-archive-from-command-line, especially the Reid's comment to his own answer which says:
Works fine in Xcode 4.4, and I'm sure it was fine in 4.3 as well. Make sure you have selected the correct Xcode release by using:
xcode-select <path to Xcode.app>
So perhaps the correct solution is based around understanding:
xcode-select -- Manages the path to the Xcode folder for Xcode BSD tools.

how to re-install Xcode 4.5?

My Xcode is not working properly I have downloaded from apples website.It show following error message.Basically i want to re-install Xcode as my current version having some bugs.
What is safest way to re-install Xcode ?
You can remove everything by opening a terminal and typing
sudo /Developer/Library/uninstall-devtools --mode=all
(You will need su access)
Then go to the App Store -> Categories -> Developer Tools -> xCode and install.
Source: http://osxdaily.com/2012/02/20/uninstall-xcode/

How to run and use Xcode 3 and Xcode 4 under OS X 10.7 Lion?

I am looking for a full guide on how to trick Xcode3 to run under Lion.
I am aware that Apple does not support this, but this doesn't meant it's impossible, it's just not supported.
This is how I upgraded my dev environment to Lion. I am only doing it this way because I'm in a crunch and have some issues with Xcode 4.
I'm just sharing what I did and the issues I encountered, not recommending anything:
I made sure I could build & launch my Apps in 10.6.8 using Xcode 3.2.x.
I upgraded my development machine to Lion 10.7.1.
I can build all my SW products with Xcode 3.2.x.
BUT, the debugger seems unhappy with some things... Though I can step and break, I can't evaluate some expressions. For example, the twist pane won't display contents of complex structures.
I'm wondering if others have debugger issues with the 3.2.x Xcode (GDB) on Lion?
Thanks,
Rick
First you have to obtain the Xcode 3.2.6 install to work. The installer is not going to work on Lion so you have two alternatives:
Run it from another partition where you have 10.6
Path the installer in order to make it run on Lion by following this guide
Also here are some other things you may have to clean inside the xcode projects:
Remove lines like ARCHS = arm7 because it will fail to build for Simulator. Best is to let Xcode use defaults (all supported archs).
Check for SDKROOT = ..., it should be only iphoneos, macosx or undefined (not ""). Keep in mind that the SDK you are building against is not necessary the minimum required SDK for running the application. It's ok if SDKROOT is missing from Xcode project files but it's not ok if it does contain a path or "".
Remove any GCC_VERSION = ...

How do I force install XCode 4.1 from the app store?

the app store botched its installation of Xcode 4.1 (it turned claimed it was 4.0 but the app store claimed 4.1 was installed). So I deleted the /Developer folder thinking this would let me reinstall a clean Xcode 4.1.
The app store still thinks Xcode 4.1 is installed and will not download or reinstall any version of Xcode. How do I force install Xcode 4.1?
Just to explain further...
The App Store download had actually worked
What you saw when you looked at Xcode was your old install, because you had not yet run the installer at that point.
Just find the "XCode installer" in your applications folder and run that to complete the install.
It caught me out too.
Do you have the application "Install Xcode" in your /Applications folder. That worked for me.
Deleting the Install Xcode app works for me - after that I have the opportunity to download that monster all over again
To make a clean installation of Xcode first completely uninstall the previous Xcode version:
From a Terminal window type:
$ sudo /Developer/Library/uninstall-devtools --mode=all
That process may take a while!
Then try your installation again.

Resources