locked
'OutputPath' property is not set for this project - XamlSamples RRS feed

  • Question

  • User100470 posted

    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.

    Monday, January 19, 2015 10:42 PM

All replies

  • User92706 posted

    Same probleme here

    Tuesday, January 20, 2015 8:31 AM
  • User28 posted

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

    Wednesday, January 21, 2015 3:40 AM
  • User100470 posted

    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.

    Wednesday, January 21, 2015 4:31 AM
  • User5087 posted

    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.

    Saturday, January 24, 2015 5:05 PM
  • User100470 posted

    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?

    Monday, January 26, 2015 11:33 PM
  • User28 posted

    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.

    Tuesday, January 27, 2015 7:17 PM
  • User100470 posted

    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.

    Tuesday, January 27, 2015 11:11 PM
  • User28 posted

    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.

    Wednesday, January 28, 2015 5:36 AM
  • User100470 posted

    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.

    Wednesday, January 28, 2015 11:10 PM
  • User48240 posted

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

    Wednesday, January 28, 2015 11:37 PM
  • User28 posted

    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.

    Thursday, January 29, 2015 4:25 AM
  • User103993 posted

    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.

    Thursday, January 29, 2015 10:48 PM
  • User28 posted

    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.

    Friday, January 30, 2015 12:06 AM
  • User100470 posted

    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.

    Friday, January 30, 2015 2:48 AM
  • User5087 posted

    @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".

    Friday, January 30, 2015 6:13 AM
  • User100470 posted

    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.

    Sunday, February 1, 2015 11:16 PM
  • User28 posted

    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.

    Monday, February 2, 2015 6:54 PM
  • User21936 posted

    Bug report for this issue: https://bugzilla.xamarin.com/show_bug.cgi?id=25480

    Monday, February 2, 2015 9:13 PM
  • User66791 posted

    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.

    Wednesday, February 4, 2015 5:26 PM
  • User34101 posted

    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)

    Thursday, February 5, 2015 5:50 PM
  • User103993 posted

    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.

    Wednesday, February 11, 2015 11:31 AM
  • User103993 posted

    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.

    Wednesday, February 11, 2015 1:34 PM
  • User21936 posted

    @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!

    Saturday, February 21, 2015 12:22 AM
  • User73619 posted

    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?

    Wednesday, February 25, 2015 1:09 PM
  • User985 posted

    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.

    Wednesday, February 25, 2015 11:52 PM
  • User73619 posted

    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.

    Thursday, February 26, 2015 12:21 PM
  • User72577 posted

    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.

    Tuesday, March 3, 2015 3:11 PM
  • User51973 posted

    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.

    Friday, March 6, 2015 9:51 PM
  • User103525 posted

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

    Monday, March 9, 2015 8:23 PM
  • User31910 posted

    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!

    Monday, March 9, 2015 9:19 PM
  • User106091 posted

    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.

    Tuesday, March 10, 2015 4:11 AM
  • User20480 posted

    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.

    Tuesday, March 10, 2015 5:10 PM
  • User2148 posted

    there is a solution for this?

    Wednesday, June 24, 2015 9:41 PM
  • User2148 posted

    solved with XS 5.9.3.1

    Saturday, June 27, 2015 10:01 PM
  • User67946 posted

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

    Friday, July 3, 2015 8:26 PM
  • User3202 posted

    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.

    Thursday, July 30, 2015 9:46 PM
  • User2148 posted

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

    Thursday, July 30, 2015 10:09 PM
  • User3202 posted

    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.

    Friday, July 31, 2015 1:00 AM
  • User112706 posted

    The same issue here...

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

    Monday, August 3, 2015 12:51 PM
  • User459 posted

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

    Saturday, August 8, 2015 7:50 PM
  • User61120 posted

    I stopped this error occurring in my project by creating a new blank project & building that before opening and building my project.

    Thursday, August 13, 2015 10:09 AM
  • User8308 posted

    Hello, Today, without making ANY Changes in my projects I started to get this error. I was working on a new App yesterday and everything was working, I was able to compile and debug in my Simulator. Then suddenly this error keeps happening today, I cannot compile any projects. I even opened a previous project which was working perfectly and did a simple compile. it happens. This is really frustrating. Any suggestions, please?

    /Library/Frameworks/Mono.framework/Versions/4.0.4/lib/mono/4.5/Microsoft.Common.targets: Error: 'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: Debug Platform: iPhoneSimulator. (Eznetsoft Audiobook)

    Thursday, October 1, 2015 8:16 PM
  • User90084 posted

    @SamuelJocelyn Try the MDK patch described here. Just worked for me.

    Thursday, October 1, 2015 8:56 PM
  • User8308 posted

    I

    Friday, October 2, 2015 1:48 AM
  • User8308 posted

    I simply did a Clean All, close Xamarin, Restart my MAC the problem went away.

    Friday, October 2, 2015 2:09 AM
  • User2148 posted

    Take a look to bugzilla. Should be a patch

    Friday, October 2, 2015 5:16 AM
  • User126619 posted

    Same problem here this morning. Opened a solution I have been working on for several weeks now. First time for this error. My project was created in Xamarin studio, never been touched by VS. I checked solution build config mappings and all good.

    I cleaned and closed the solution, quit Xamarin studio and simulator, rebooted my mac. Working fine now.

    Monday, October 5, 2015 3:52 PM
  • User157312 posted

    Hi , I get the same error when i run Xamrin IOS project in Jenkins Build using Execute shell, saysing OutputPath p[roperty is not set for this project, Usually this is caused by invalid configuration/Platform combination, Original Values: COnfiguration : Release Platform: Iphone. Build step Execute Shell marked build as failure.

    My Build Command uses "-c=Release|iPhone" My Xamarin Version is 5.9

    Actually it the referenced project (a .net library), that fails, hence forth the ios project fails.

    But when i build the solution in Xamarin studio or Visual Studio it is builds successfully.

    Thursday, October 29, 2015 6:02 AM
  • User43424 posted

    Like others I have been hit by this suddenly; without having made any changes. When I went to bed I could build; when I woke up I could not. I have cleaned. I have restarted, rebooted; all to no avail.

    Update: Ben Beckley's steps to fix corrected this error. Find them here:

    https://bugzilla.xamarin.com/show_bug.cgi?id=25480#c13

    Thursday, January 21, 2016 5:26 PM
  • User32870 posted

    Same problem here: I have created a new project in XS on my mac, PCL, Android and iOS (MvvmCross). There were no issues building and running the project. After the weekend I wanted to continue with this project and I got the 'Outputpath' property error. I tried running the same project in VS and it builds and runs without any issues. After an hour playing around with build options etc. I tried @IanGeoghegan / Ben Beckley's solution and it works, no idea why...

    Another thing I noticed is that when I set the iOS project as startup project, only debug and release were available in my config selector, I was missing the debug|iPhone and debug|iPhoneSimulator configs. After Ians solution these configurations somehow reapppeared.

    ps. @IanGeoghegan: Thanks!!!

    Monday, April 11, 2016 7:01 AM
  • User32870 posted

    @Xamarin (or @Microsoft?): This issue is really annoying and time consuming, are you working on a fix?

    Monday, April 11, 2016 8:56 AM
  • User208447 posted

    I've also experienced this issue, but not with the Xaml Samples, but in my team's project. It turned out to be from the custom build configurations I added to the solution.

    Long story short, xbuild builds differently to msbuild, Visual Studio, or Xamarin Studio. xbuild takes the csproj file as its entry point, for example: From my build system log output (Bitrise - which is awesome ;-) ) xbuild /t:PackageForAndroid /p:Configuration"PlayStore" "./MyApp/MyProject.Droid/MyProject.Droid.csproj" Where as normally you'd point to the solution file in other tools. The solution file contains mappings to know what build config to use for each project, because its possible to have a solution level build config and different configs for each project under that solution config.

    The solution was to ensure that the build config passed to xbuild you see in the command line executed by your build system also exists for any PCL projects you have.

    Full details in a blog I wrote to document the solution here: http://bit.ly/2abqs6D

    Monday, July 25, 2016 10:54 AM