Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Getting this error in my Xamarin.iOS project, both in the current alpha channel xamarin build and beta channel.
Xamarin Studio Community
Version 6.2 (build 1812)
Version: 10.4.0.121 (Xamarin Studio Community)
Build date: 2017-02-10 12:10:51-0500
I have absolutely no idea how to debug it and no idea what might be causing it.
Here's the relevant target from the Xamarin.Build.Download.targets file:
<Error Text="XamarinBuildDownloadDir property is not set" Condition="'$(XamarinBuildDownloadDir)'==''" />
I tried setting the log verbosity for MSBuild to diagnostic or detailed, but the build output doesn't really show anything useful.
/Users/marksilver/.nuget/packages/xamarin.build.download/0.2.2/build/Xamarin.Build.Download.targets(24,3): error : XamarinBuildDownloadDir property is not set
Done building target "_XamarinBuildDownloadCore" in project "SaltApp.iOS.csproj" -- FAILED.
Another potentially useful bit of information from the build output:
/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1972,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
Done building target "ResolveAssemblyReferences" in project "SaltApp.iOS.csproj".
So I've managed to get rid of the error by removing the Xamarin Google Tag Manager iOS nuget
I've seen other posts indicating the same thing for other GoogleApis components.
I'm fairly certain this error is related somehow to the nugets for https://github.com/xamarin/GoogleApisForiOSComponents/
Where's the proper location to file this?
This belongs with the Components team. I will take it.
In general you should not have to set 'XamarinBuildDownloadDir.' The code should be able to assign a default.
You may want to try and update Xamarin Build Download to a newer version.
0.4.2 is the latest version. I think it does not have this check and it may reveal the real error.
fyi there is an open pull request that releases the source for Xamarin Build Download.
You can try to manually set the XamarinBuildDownloadDir in your csproj. You will have to edit the csproj in a text editor.
You will have to add a line in the top property group. Here for example...
Assigning to Israel as he has some other ideas.
I haven't tried to set it or alter it in any way, nor am I using the Xamarin.Build.Download nuget in my project anywhere.
I assume it comes in with the Google Tag Manager iOS bindings nuget. Hopefully Israel knows what it might be.
I can see Xamarin.Build.Download (v0.2.2) is a dependency of that nuget here https://www.nuget.org/packages/Xamarin.Google.iOS.TagManager/
So either there's a reason it needs to use the older version or it hasn't been updated.
I added this line to the csproj file.
Seems to work, not 100% if that's the right directory, but it will have to do for now.
Xamarin Build Download is not something that you reference in your code. It only provides build tasks that download additional Google 'bits' to add to your application.
The dependency version has not been updated in NuGet yet because we have not released a new Tag Manager. 0.2.2 should work just fine. Not sure yet why 0.2.2 does not work for you. The later versions (0.3+) of Xamarin Build Download were mainly focused for dealing with Android binding projects such as Android Support and Google Play. But in doing that work we changed the logic for where files are downloaded to. I am thinking if you update to the latest you will not need to set that property.
Israel did find another issue with the files being downloaded. (It may actually have nothing to do with your situation.) There is a typo in the targets file for the ID of the dependency being downloaded.
However if you are satisfied with setting the property or updating and you can build you app I suggest we close this bug.
Israel and Matt please respond with your thoughts.
I gathered that thanks Bill.
I don't think I'm able to update to the latest, my project is using project.json with nuget v3.x. I don't believe you can see the dependencies in the packages list.
All I know is as soon as I have added the latest version of nuget for Xamarin.Google.iOS.TagManager to my project. I get the bug when I build, last time I tried I was able to get the project to build in debug, but then I changed to release and it reappeared.
I don't see the point in closing the bug when it's obviously still present and may cause issues for other users.
My point was that if you could update to the latest and it resolved the issue, then there is no action for this bug. Or we would update TagManager, and others, to point to the later version of Xamarin build download.
It was not my intention to be dismissive of your situation. Apologies if that was the impression I gave.
Moving forward... You may have just provided the critical bit of info I was missing (or I just overlooked previously.) The use of project.json. We will dig deeper into this.
For clarity, it appears that you have a working workaround. Setting XamarinBuildDownloadDir. Can you confirm that you are no longer blocked (although inconvenienced?)
Yes no longer blocked, thank you.
And thanks for taking the time for looking in to this. Much appreciated.
After a slack discussion I found that using project json is the issue. There is a bug in the system that appears to be fixed now in source but will take some time to propagate to the product. To be honest I am not sure of the timeline.
We believe this bug causes the targets file to be added to your project but not the props file that is contained in the NuGet. The props file is what would typically be setting up the default XamarinBuildDownloadDir property. This supports why setting the property manually in your situation works.
For this reason I will be resolving this defect as a duplicate of 45321. Please comment again if you feel there is a better appropriate action.
Additionally we technically do not support this mode of operation officially. Xamarin.Android and Xamarin.iOS projects should not be using project.json. We recommend that you change your projects to use csproj and packages.config. It could save you future headaches.
*** This bug has been marked as a duplicate of bug 45321 ***