Bug 321 - Monodevelop creates Package entries in References which don't properly load on Windows
Summary: Monodevelop creates Package entries in References which don't properly load o...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: 2.6 RC 1
Hardware: PC Linux
: Normal major
Target Milestone: ---
Assignee: Lluis Sanchez
Depends on:
Reported: 2011-08-18 06:18 UTC by Wolfgang Silbermayr
Modified: 2017-09-26 12:19 UTC (History)
8 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Wolfgang Silbermayr 2011-08-18 06:18:39 UTC
I am trying to create a project that works on Windows and Linux and can be developed in parallel over git. When I create the project on Linux, I receive entries like this one for the GTK bindings in the .csproj file:
<Reference Include="gtk-sharp, Version=, Culture=neutral, PublicKeyToken=35e10195dab3c99f">

When I try to open the project on Windows, it tells me that the assembly is not available. When I remove the <Package> entry, it loads perfectly on Windows.

The problem is that the Linux version of Monodevelop re-creates the entries whenever any referenece is edited, so it is not possible to work together unless you manually delete the entries every time you check in a new version with changed references on Linux.
Comment 1 Mikayla Hutchinson [MSFT] 2011-08-18 19:31:21 UTC
This is causing problems for me too.
Comment 2 Daniel Hughes 2012-08-03 20:40:11 UTC
As far as I can tell the Package tag serves no useful purpose. The debian packaging tools don't use them at all. I don't build RPM's so maybe it helps there. If I remove the package tags it works fine in ubuntu it builds fine and I can build my debian packages fine. 

I would like to know what these tags are actually for. And if they are required for some obscure use case I would at least like a way to tell Mono Develop not to include them, because they offer no value to my project and make cross platform development very frustrating.
Comment 3 Mikayla Hutchinson [MSFT] 2012-08-06 13:26:17 UTC
The Package metadata value has nothing to do with creating packages. It's the name of the pkg-config package from which MD resolved the reference, and is intended to help with resolving the reference consistently, since multiple packages can provide a single dll.

The main problem is that the Package metadata is treated as a hard requirement, not a hint, so it breaks on Windows, where assemblies do not come from packages. The other problem is that MD always adds the Package metadata, even when it's not needed, and adds it to existing references, not just new references.
Comment 4 Daniel Hughes 2013-03-21 06:52:01 UTC
I have retested in Xamarin Studio 4.0.2 (build 18) and this problem still exists. It refuses to resolve any references which have the package tag.

This means that every time I checkout on windows after committing on linux I have to rebuild my project references. This is extremely frustrating.
Comment 5 Milton Pividori 2013-05-25 17:04:35 UTC
This is causing problems for me too. Any workaround (not including manually editing the csproj file)?
Comment 6 Marius Ungureanu 2017-09-26 12:19:34 UTC
Can't seem to reproduce Package metadata being added (even for gtk# as a GAC reference). If the bug still occurs, please file another bug report.