EzDevInfo.com

build interview questions

Top build frequently asked interview questions

What does the Visual Studio "Any CPU" target mean?

I have some confusion related to the .NET platform build options in Visual Studio 2008.

What is the "Any CPU" compilation target, and what sort of files does it generate? I examined the output executable of this "Any CPU" build and found that they are (who would not see that coming!) the x86 executables. So, is there any the difference between targeting executable to x86 vs "Any CPU"?

Another thing that I noticed, is that managed C++ projects do not have this platform as an option. Why is that? Does that mean that my suspicion about "Any CPU" executables being plain 32-bit ones is right?


Source: (StackOverflow)

Xcode warning: "Multiple build commands for output file"

I am getting an error like this:

[WARN]Warning: Multiple build commands for output file /Developer/B/Be/build/Release-iphonesimulator/BB.app/no.png

[WARN]Warning: Multiple build commands for output file /Developer/B/Be/build/Release-iphonesimulator/BB.app/d.png

[WARN]Warning: Multiple build commands for output file /Developer/B/Be/build/Release-iphonesimulator/BB.app/n.png

But I have checked Xcode and I don't see any duplicates of such files at all. As this post in the Apple Mailing Lists say, there are no duplicates.


Source: (StackOverflow)

Advertisements

Xcode "Build and Archive" from command line

Xcode 3.2 provides an awesome new feature under the Build menu, "Build and Archive" which generates an .ipa file suitable for Ad Hoc distribution. You can also open the Organizer, go to "Archived Applications," and "Submit Application to iTunesConnect."

Is there a way to use "Build and Archive" from the command line (as part of a build script)? I'd assume that xcodebuild would be involved somehow, but the man page doesn't seem to say anything about this.

UPDATE Michael Grinich requested clarification; here's what exactly you can't do with command-line builds, features you can ONLY do with Xcode's Organizer after you "Build and Archive."

  1. You can click "Share Application..." to share your IPA with beta testers. As Guillaume points out below, due to some Xcode magic, this IPA file does not require a separately distributed .mobileprovision file that beta testers need to install; that's magical. No command-line script can do it. For example, Arrix's script (submitted May 1) does not meet that requirement.
  2. More importantly, after you've beta tested a build, you can click "Submit Application to iTunes Connect" to submit that EXACT same build to Apple, the very binary you tested, without rebuilding it. That's impossible from the command line, because signing the app is part of the build process; you can sign bits for Ad Hoc beta testing OR you can sign them for submission to the App Store, but not both. No IPA built on the command-line can be beta tested on phones and then submitted directly to Apple.

I'd love for someone to come along and prove me wrong: both of these features work great in the Xcode GUI and cannot be replicated from the command line.


Source: (StackOverflow)

Node package ( Grunt ) installed but not available

I'm trying to build a github jquery-ui library using grunt, but after running npm install I still can't run the command according to the readme file. It just gives No command 'grunt' found:

james@ubuntu:~/Documents/projects/ad2/lib/jquery-ui$ grunt build
No command 'grunt' found, did you mean:
 Command 'grun' from package 'grun' (universe)
grunt: command not found
james@ubuntu:~/Documents/projects/ad2/lib/jquery-ui$ npm ls
jquery-ui@1.9.0pre /home/james/Documents/projects/ad2/lib/jquery-ui
├─┬ grunt@0.3.9 
│ ├── async@0.1.18 
│ ├── colors@0.6.0-1 
│ ├─┬ connect@1.8.7 
│ │ ├── formidable@1.0.9 
│ │ ├── mime@1.2.5 
│ │ └── qs@0.5.0 
│ ├── dateformat@1.0.2-1.2.3 
│ ├─┬ glob-whatev@0.1.6 
│ │ └─┬ minimatch@0.2.4 
│ │   └── lru-cache@1.0.6 
│ ├─┬ gzip-js@0.3.1 
│ │ ├── crc32@0.2.2 
│ │ └── deflate-js@0.2.2 
│ ├── hooker@0.2.3 
│ ├─┬ jshint@0.5.9 
│ │ ├── argsparser@0.0.6 
│ │ └─┬ minimatch@0.2.4 
│ │   └── lru-cache@1.0.6 
│ ├─┬ nodeunit@0.6.4 
│ │ ├── tap-assert@0.0.10 
│ │ └─┬ tap-producer@0.0.1 
│ │   ├── inherits@1.0.0 
│ │   ├── tap-results@0.0.2 
│ │   └── yamlish@0.0.5 
│ ├─┬ nopt@1.0.10 
│ │ └── abbrev@1.0.3 
│ ├─┬ prompt@0.1.12 
│ │ ├── pkginfo@0.2.3 
│ │ └─┬ winston@0.5.11 
│ │   ├── eyes@0.1.7 
│ │   ├─┬ loggly@0.3.11 
│ │   │ └── timespan@2.2.0 
│ │   └── stack-trace@0.0.6 
│ ├── semver@1.0.13 
│ ├─┬ temporary@0.0.2 
│ │ └── package@1.0.0 
│ ├── uglify-js@1.0.7 
│ ├── underscore@1.2.4 
│ └── underscore.string@2.1.1 
├── grunt-compare-size@0.1.4 
├─┬ grunt-css@0.2.0 
│ ├── csslint@0.9.8 
│ └── sqwish@0.2.0 
├── grunt-html@0.1.1 
├── request@2.9.153 
├─┬ rimraf@2.0.1 
│ └── graceful-fs@1.1.8 
└─┬ testswarm@0.2.2 
  └── request@2.9.202 

I'm confused, what am I missing please?


Source: (StackOverflow)

How and why do I set up a C# build machine?

I'm working with a small (4 person) development team on a C# project. I've proposed setting up a build machine which will do nightly builds and tests of the project, because I understand that this is a Good Thing. Trouble is, we don't have a whole lot of budget here, so I have to justify the expense to the powers that be. So I want to know:

  • What kind of tools/licenses will I need? Right now, we use Visual Studio and Smart Assembly to build, and Perforce for source control. Will I need something else, or is there an equivalent of a cron job for running automated scripts?
  • What, exactly, will this get me, other than an indication of a broken build? Should I set up test projects in this solution (sln file) that will be run by these scripts, so I can have particular functions tested? We have, at the moment, two such tests, because we haven't had the time (or frankly, the experience) to make good unit tests.
  • What kind of hardware will I need for this?
  • Once a build has been finished and tested, is it a common practice to put that build up on an ftp site or have some other way for internal access? The idea is that this machine makes the build, and we all go to it, but can make debug builds if we have to.
  • How often should we make this kind of build?
  • How is space managed? If we make nightly builds, should we keep around all the old builds, or start to ditch them after about a week or so?
  • Is there anything else I'm not seeing here?

    I realize that this is a very large topic, and I'm just starting out. I couldn't find a duplicate of this question here, and if there's a book out there I should just get, please let me know.

    EDIT: I finally got it to work! Hudson is completely fantastic, and FxCop is showing that some features we thought were implemented were actually incomplete. We also had to change the installer type from Old-And-Busted vdproj to New Hotness WiX.

    Basically, for those who are paying attention, if you can run your build from the command line, then you can put it into hudson. Making the build run from the command line via MSBuild is a useful exercise in itself, because it forces your tools to be current.


    Source: (StackOverflow)

  • .NET 4.0 build issues on CI server

    Anybody manage to get .NET 4.0 applications compiling on a CI server without installing Visual Studio 2010 on a CI server?

    No SDK exists for .NET 4.0. Have installed .NET 4.0 on CI Server. Msbuild.exe works for simple projects and give the following warning:

    (GetReferenceAssemblyPaths target) -> C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(847,9): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.


    Source: (StackOverflow)

    Where does Xcode 4 store Scheme Data?

    I'm just starting to use Xcode 4, and I'm trying to find the file in a project where it stores all of a project's Schemes. I figured they would be stored in a file in the xcodeproj directory somewhere, but for the life of me I can't find which one.

    All of my projects are stored on an SVN server, and I'd like to keep Scheme info with the project. Right now when you check out a project fresh, the Schemes don't make it along with.

    EDIT: After playing with this a bit more, it appears that Schemes are stored each as separate files in xcuserdata/user.xcuserdata/xschemes/MyScheme.xscheme with a xcschememanagement.plist file to keep them all sorted.

    So my new question, is there a way to store these in a per-project scope instead of a per-user scope? This way when another developer opens the same project, he'll see the same schemes I set up?


    Source: (StackOverflow)

    Javascript web app and Java server, build all in Maven or use Grunt for web app?

    We are doing a web application with AngularJS and we like the idea of using Bower for Dependency Management and Grunt for building, running tests etc. (Yeoman)

    The server is done with Java using Maven, so of course we would like with a simple mvn install build everything (web application + server)

    So what approach you took and why?

    1) Treat them as two different applications, which in fact they are. So using different building methods/tools is acceptable.

    2) Forget about Grunt Bower, use Maven plugins to build, run tests, manage dependencies for the web application. If that is the case, which ones?

    3) Use Maven exec plugin to call Grunt to build the front-end webapp. I see this more as a hack than a solution.

    4) Other.

    Approach easier to integrate with Jenkins is a plus.

    Thanks in advance!


    Source: (StackOverflow)

    Running a release build with Xcode 4

    I see how Xcode 4 splits the info on your targets nicely in one view, but how does one build and run these different builds? All I see are the options to build and to run, and these options to build for running, testing, and profiling. It's not clear to me how these map to the build configurations, though.


    Source: (StackOverflow)

    eclipse stuck when building workspace

    I am using eclipse 3.4.1 Java EE under Vista. It seems to like getting stuck when building my workspace. Canceling the build doesn't seem to do anything as well.

    Why is this happening and how do I fix the problem?


    Source: (StackOverflow)

    leiningen - how to add dependencies for local jars?

    I want to use leiningen to build and develop my clojure project. Is there a way to modify project.clj to tell it to pick some jars from local directories?

    I have some proprietary jars that cannot be uploaded to public repos.

    Also, can leiningen be used to maintain a "lib" directory for clojure projects? If a bunch of my clojure projects share the same jars, I don't want to maintain a separate copy for each of them.

    Thanks


    Source: (StackOverflow)

    Difference between Rebuild and Clean + Build in Visual Studio 2008

    What is the difference between just a Rebuild and doing a Clean + Build in Visual Studio 2008? Is Clean + Build different then doing Clean + Rebuild?


    Source: (StackOverflow)

    iOS5 Storyboard error: Storyboards are unavailable on iOS 4.3 and prior

    I've built a small app using storyboards and it ran great. Just before final testing I decided to try it out to see if it runs on iOS 4.3. I clicked on the gray 5.0 in the project settings and selected 4.3.

    The app failed to build with the following error message:

    Storyboards are unavailable on iOS 4.3 and prior

    Both the iPhone and iPad storyboards tell me that.

    The issue that when I switched back to iOS5 target, I still keep getting these errors from both storyboards, and the product won't build! I checked: iOS Deployment target in projects settings is 5.0 Target app deployment target is 5.0 Build settings uses iOS 5.0 SDK

    What else do I need to do to restore my project to a buildable state? Is this a brand new bug or am I forgetting something?

    Update: I kept getting this error even after doing a clean. I changed the debugger in Schemes to "LLDB" and did an additional clean, the project now builds and compiles


    Source: (StackOverflow)

    Re-sign IPA (iPhone)

    I currently build all my applications with hudson using xcodebuild followed by a xcrun without any problems

    I've received a couple of IPA files from different people that I would like to re-sign with a enterprise account instead of the corporate account (for the app store, or sometimes ad-hoc distributed).

    My problem is that when I try to resign the app, it won't install on my device (and it should since it's a Enterprise build). The error message is on the device (not in iTunes) and it tells me simply that it couldn't install the app. No more information is given.

    I've found some information, ( http://www.ketzler.de/2011/01/resign-an-iphone-app-insert-new-bundle-id-and-send-to-xcode-organizer-for-upload/ )

    And this might be possible. The problem I'm facing is that it doesn't seem to embed the mobile provisioning profile as I do with my normal builds (using xcrun) is this possible to control with the codesign tool, or is it possible to re-sign with xcrun?

    With my resign script i currently do

    • unzip app.ipa
    • appname=$(ls Payload)
    • xcrun -sdk iphoneos PackageApplication -s "$provisioning_profile" "$project_dir/Payload/$appname" -o "$project_dir/app-resigned.ipa" --sign "$provisioning_profile" --embed "$mobileprovision"

    I've looked in the resulting ipa file and it seems to be very similar to the original app. What files should really change here? I initially thought the the _CodeSignature/CodeResources would change, but the content looks pretty much exactly the same.

    Pointers are much appreciated.


    Source: (StackOverflow)

    Maven: what is pluginManagement?

    This is a snippet of my pom file.

    ....
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.4</version>                        
                    <executions>
                        <execution>
                            <phase>install</phase>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <configuration>
                                ......
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
    ...
    

    I use it successfully with the command

    mvn install
    

    But, when I try to enclose it into the "pluginManagement" tag, the maven-dependency-plugin stops to work when I launch the install goal. Why the "pluginManagement" tag change the build behavior ? Or should I use another goal or option ?

    Thank you in advance for any help


    Source: (StackOverflow)