'OutputPath' property is not set for this project - XamlSamples

I downloaded the XamlSamples project, tried to build it, and I get the following error.

'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: Debug Platform: iPhoneSimulator. (XamlSamples.iOS)

Tried to build to any other platform, it does not work.

A bit annoying when the sample code you download does not compile.

«1

Posts

  • TobiasHardesTobiasHardes Tobias Hardes USMember

    Same probleme here

  • mhutchmhutch Mikayla Hutchinson USXamarin Team Xamurai

    What versions are you using? You can copy/paste this information from the About dialog.

  • JohnLyons.2649JohnLyons.2649 John Lyons USMember

    The latest version, on mac

    Xamarin Studio
    Version 5.7 (build 661)
    Installation UUID: 3efb3743-ac94-4725-923d-848452f8a902
    Runtime:
    Mono 3.12.0 ((detached/a813491)
    GTK+ 2.24.23 (Raleigh theme)

    Whenever I have an issue, I update to find out if it has been fixed already.

  • DirkWeltzDirkWeltz Dirk Weltz DEMember ✭✭✭

    Perhaps you use a library or project, that isn't converted to Unified API? I had the same problems, which are gone since I converted all projects to Unified API.

  • JohnLyons.2649JohnLyons.2649 John Lyons USMember

    We downloaded the XAML sample from Xamarin, and then try to compile it.

    Why would I have to alter it? And it is a forms project, not just a Xamarin.iOS project?

  • mhutchmhutch Mikayla Hutchinson USXamarin Team Xamurai

    Looking at the sln file, it appears the XamlSamples project in the solution is not configured to build in the iPhoneSimulator or iPhone solution configurations. When you build the XamlSamples.iOS project in these configurations, it fails since it references the XamlSamples project - which is set not to be built.

    Unfortunately this is common with solutions created in Visual Studio, as VS does not automatically set up the solution configurations properly. I'll speak to the docs team about getting it fixed for this sample.

    To identify this problem

    Look at each of the projects referenced by the project that's failing to build - in this case XamlSamples. If you see a little "i" icon by the library project, hover over it. If it says "not built in current configuration", then that's the problem.

    To fix the problem

    Open Solution Options. Go to the Build->Configurations panel, then the Configuration Mappings section. Select the configuration you need to fix, and set the referenced project to build in some configuration.

    The fix steps are pretty much the same in Visual Studio.

  • JohnLyons.2649JohnLyons.2649 John Lyons USMember

    Thanks for getting back to me.

    I change the solution options to be buildable as I have shown in the image attached. Still have the same error.

  • mhutchmhutch Mikayla Hutchinson USXamarin Team Xamurai

    You're editing the "Ad-Hoc|AnyCPU" solution configuration there - see the combos at the top. You likely want to edit the "Debug|iPhoneSimulator" configuration, assuming that's what you have set to build in the main toolbar.

    However, the sample's been fixed, so the easiest way is probably just to re-download it.

  • JohnLyons.2649JohnLyons.2649 John Lyons USMember
    edited January 2015

    Oh thanks, I still didn't get that to work, even with the fixes you mentioned.

    And downloaded a new version from here http://developer.xamarin.com/samples/XAMLSamples/, and still getting the same error.

  • YolandaYolanda Yola Silva USMember

    Same problem for me. Workaround above didn't solve the problem. Any other ideas?

  • mhutchmhutch Mikayla Hutchinson USXamarin Team Xamurai

    It's not a workaround, it's a fix. VS creates broken solution configurations for iOS + PCL. We're looking into ways to work around this issue, but for now manual fixup is necessary.

    If the fix I described is not working then you're probably changing the wrong configuration. I'll try to write a clearer guide tomorrow with screenshots.

  • JoeDanCooperJoeDanCooper Joseph D. Cooper PLMember

    Nope.

    I've got this and I work entirely in Xamarin Studio. I've made an iOS library project and, when I add the reference to my iOS project, the build no longer works; it gives this error. When I remove the reference it goes away.

    "If you see a little "i" icon by the library project, hover over it."

    Nope.

    "Go to the Build->Configurations panel, then the Configuration Mappings section. Select the configuration you need to fix, and set the referenced project to build in some configuration."

    I can't grok this sentence. I went to Build -> Configurations. There's no word "Configuration Mappings". There's a list of configurations: "Debug" and "Release". All I can do is add or remove them.

  • mhutchmhutch Mikayla Hutchinson USXamarin Team Xamurai
    edited January 2015

    Hopefully this image will help explain. Note that it's the Solution Options, not the Project Options.

    You'll likely need to fix Debug|iPhone, Debug|iPhoneSimulator, Release|iPhone, Release|iPhoneSimulator, AdHoc|iPhone, AppStore|iPhone. Note that AdHoc/AppStore should use the Release configuration of the PCL, since it does not have (and does not need) separate AdHoc/AppStore configurations.

  • JohnLyons.2649JohnLyons.2649 John Lyons USMember

    Nope, did this, still no luck. As you can see from the image, setup exactly as you suggest, same error. Tried cleaning, restarting, no dice.

    Not sure what you are doing different? Did you ever get that error before you started fixing it?

    Can you upload the fixed version.

  • DirkWeltzDirkWeltz Dirk Weltz DEMember ✭✭✭

    @JohnLyson.2649, @JoeDanCooper, the projects, you referenced, is this a unified project? Did you changed it, cleared it and compiled it? I got this message, because there was a project, that wasn't "unified".

  • JohnLyons.2649JohnLyons.2649 John Lyons USMember

    How do I check if it is a unified project? I downloaded the samples from the samples page (twice) http://developer.xamarin.com/samples/XAMLSamples/ and compiled it? It comes up with this error straight away.

  • mhutchmhutch Mikayla Hutchinson USXamarin Team Xamurai

    Sorry about this, I'm working from home due to a snowstorm and I don't have a Mac with me so I've being trying to figure it out by inspecting the solution/project files on Windows.

    The solution configuration were inconsistent, which could cause this exact error message, which is why I was certain is was the problem. However, I've now got hold of a build log from someone else seeing this issue which has helped to reveal there's another underlying problem. Our MSBuild host on Mac doesn't resolve the correct configuration of referenced projects in some cases. This wasn't a problem for Classic projects since they didn't use MSBuild, but it's showing up for Unified since they do. I'm working on a fix.

    In the mean time, you should be able to work around it by adding Debug|iPhone and Debug|iPhoneSimulator configurations to your shared project and setting the corresponding solution configurations to use those instead of Debug.

  • JGoldbergerJGoldberger Jon Goldberger USXamarin Team, University Xamurai
  • AnthonyJanssensAnthonyJanssens Anthony Janssens BEUniversity ✭✭

    FYI, I had the same problem with a newly created project (iOS + PCL).
    I first create an iOS unified universal single view app. I then add to the solution a newly created PCL. As long as i don't add the reference to the PCL the iOS project compiles fine. As soon as I add the PCL as a reference I get the 'OutputPath' error.

    It turns out that what fixed it for me was choosing another folder for my project! For a reason that is completely unknown to me the folder I was trying setup the project in was creating an issue. The folder was called 'Sandbox' and the permissions where completely normal. I decided to re create my solution (exactly the same way with the same name) in another folder and all went well.

    Maybe this info can help.

    Cheers,
    Anthony.

  • PatrickRibaultPatrickRibault Patrick Ribault FRMember

    Same problem for me; since the latest xamarin update,
    my application build perfectly in VS but not in xamarin studio (needed to release to appstore)

  • JoeDanCooperJoeDanCooper Joseph D. Cooper PLMember

    See attached. My configurations view looks like this on both iOS application projects and library projects. Xamarin is wholly up to date and it simply does not show what you're showing me.

    I just converted another product to unified, along with all dependencies, and cleaned everything, and updated Xamarin, and I'm getting this error on this project, too.

    Need another way to look at this. I'm utterly stumped.

  • JoeDanCooperJoeDanCooper Joseph D. Cooper PLMember

    Hold up – I got it to build. (And I can't see how to amend or remove my previous post so I'm double posting.)

    Still, I can't understand why my configurations panel looks different.

  • JGoldbergerJGoldberger Jon Goldberger USXamarin Team, University Xamurai

    @JoeDanCooper ,

    The difference on the Configurations panel is that you are looking at the Project Options Configuration page, but it is the Solution Options Configuration page that you want to use to set mappings.

    I hope this helps!

  • MarkGamberMarkGamber Mark Gamber USMember

    I'm having the problem here, too. I was able to successfully convert my iOS project to the unified platform using the Dec 12 (or thereabouts) Xamarin. I updated Xamarin yesterday to the latest & greatest and haven't been able to complete a build using Xamarin Studio since then using that version.

    But it goes beyond that. When I run xbuild against the csproj file in a terminal, it DOES build and displays several coding errors, such as some overrides that use int instead of nint, StringSize calls off UIView instead of String classes and so on. None of these appear in the IDE, just the "'OutputPath' property is not set...". I can fix all the errors and do a successful build using xbuild but what good is that without a debugger to run it in a simulator? So I try it again in the IDE and just get that error again. Nothing has changed in the csproj or sln files. A diff between the current project and the project before I fixed all the errors (fresh download) shows no differences whatsoever. What gives? How do I get rid of this, please?

  • SlavaBaroulineSlavaBarouline Slava Barouline AUMember ✭✭
    edited February 2015

    I had to delete all the build configurations in the solution and then added new ones.
    Then I restarted Xamarin Studio.

    This fixed the issue.

  • MarkGamberMarkGamber Mark Gamber USMember

    I have 12 projects in the solution...if that's what I really have to do I'm gonna be fairly pissed off about it.

  • Rob.0184Rob.0184 Robert Ringham USUniversity ✭✭

    I am also having this exact issue, and am similarly confused.

    I highly recommend that Xamarin please post a Xamarin Studio-compatible version of this sample. Having to "fix" a sample before you can play around with it is not a particularly fun way to get acquainted with a new technology.

  • JonScaletJonScalet Jon Scalet USMember

    I'm caught with this error but it's not with the XForms Sample project. Thoroughly confused here? I can build the Shared PCL projects but not iOS or Droid.

  • TamilSelvanRTamilSelvanR TamilSelvan R USMember

    I have downloaded latest XamlSamples , But still, I got this error while i am trying to build it.

  • SteveMacdonaldSteveMacdonald Steve Macdonald CAUniversity, Certified XTC Partners ✭✭

    I started getting this error after opening a Xamarin Forms solution that had been created with VS.Net in XS for Mac. I've tried all the suggestions re Configurations, so far to no avail. This sort of thing can really jeopardize projects that are on a tight timeline!

  • BinGaoBinGao Bin Gao USMember

    Here is what I did to get the downloaded XamlSamples to run:

    I have Xamarin Studio 5.7.2 (build 7) on Mac.
    Set XamlSamples.Android as Startup Project.
    Attached a physical Sumsung Galaxy S4.
    "Debug"->"Galaxy S4" runs ok.

    THEN

    Set XamlSamples.iOS as Startup Project.
    "Debug | IphoneSimulator" -> "iPhone 5s iOS 8.1" runs ok.

  • BrianMBrianM Brian McCarty USMember ✭✭

    I have had this problems on multiple occasions. It happens if I rename files in a PCL project or when I ran the Unified Project Migration tool. The only solution I have found was to use a Shared Project and not a PCL project which is not ideal for me in my current project.

  • AlessandroCaliaroAlessandroCaliaro Alessandro Caliaro ITMember ✭✭✭✭✭

    there is a solution for this?

  • AlessandroCaliaroAlessandroCaliaro Alessandro Caliaro ITMember ✭✭✭✭✭

    solved with XS 5.9.3.1

  • ErnestoOrozco.3907ErnestoOrozco.3907 Ernesto Orozco USMember, University

    it not solved I still have this issue, with version 5.9.4

  • valdeterovaldetero Seth Valdetero USInsider, University ✭✭

    I just started having this issue with 5.9.4 on my personal projects. My configurations are all set and haven't changed and neither has my csproj files. This is a pretty sweet bug to have two days before I give a Xamarin presentation.

  • AlessandroCaliaroAlessandroCaliaro Alessandro Caliaro ITMember ✭✭✭✭✭

    Try to remove obj and bin folders, clean the solution , restart Xamarin studio , rebuild all and pray

  • valdeterovaldetero Seth Valdetero USInsider, University ✭✭

    I just switched to the alpha channel, installed a different version of Xamarin Studio, restarted, and built. I also tried it on another mac that has Xamarin Studio 5.9.4 installed on it and it worked just fine. There is no way that Visual Studio messing up the csproj files could be the issue if the unchanged files work again after an install.

  • GuiWaltrickeGuiWaltricke Guilherme Waltricke BRMember ✭✭

    The same issue here...

    rebuild, build and many things done and nothing works...

  • MateuszKierepkaMateuszKierepka Mateusz Kierepka PLDeveloper Group Leader

    this same issue here - latest beta version and Mac Os X system

«1
Sign In or Register to comment.