Bug 1690 - References should support variables in ItemSpecs
Summary: References should support variables in ItemSpecs
Status: CONFIRMED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: unspecified
Hardware: Macintosh Mac OS
: Normal enhancement
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2011-10-26 03:41 UTC by Philippe Girolami
Modified: 2011-11-16 08:52 UTC (History)
3 users (show)

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


Attachments
Monodevelop error message (27.88 KB, image/gif)
2011-10-26 03:41 UTC, Philippe Girolami
Details


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 for Bug 1690 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Philippe Girolami 2011-10-26 03:41:07 UTC
Created attachment 768 [details]
Monodevelop error message

A project developped in VS2010 on Windows loads correctly when it contains the following
<Reference Include="System, Version=$(VersionToUseInSharedLibs)">
      <Name>System</Name>
</Reference>


The same project does not load in Monodevelop for Mac because of the Version part of the Inclulde. See attachement.

Removing it allows the project to load
<Reference Include="System">
      <Name>System</Name>
</Reference>

Is there a way to handle the Version statement in Monodevelop ?
Comment 1 Philippe Girolami 2011-10-26 03:42:26 UTC
Additionnaly, the csproj files contain the following higher up


<VersionToUseInSharedLibs Condition=" '$(Platform)' == 'Android' ">2.0.5.0</VersionToUseInSharedLibs>
<VersionToUseInSharedLibs Condition=" '$(Platform)' != 'Android' ">4.0.0.0</VersionToUseInSharedLibs>
Comment 2 Alan McGovern 2011-10-26 05:29:10 UTC
We currently don't have support for evaluating msbuild conditionals (or any other msbuild constructs) within monodevelop itself. As such, there's no simple way to do what you want without breaking features such as code completion. There's no ETA on when we expect to have support for this, but we'll update the bug when we know more.
Comment 3 Mikayla Hutchinson [MSFT] 2011-10-26 05:58:11 UTC
MD supports most MSBuild projects by mapping them into its old internal build engine, which can't support arbitrary MSBuild constructs like this, However, it uses xbuild/MSBuild as the build engine for Android projects so those project can handle more advanced MSBuild features. There's experimental support to use MSBuild/xbuild as the build engine for other project types, and you can enable this in MD Preferences. When using xbuild, code completion should work correctly as it uses the assemblies resolved by xbuild.

That said, even though xbuild support would be able to build the project and provide correct code completion for this construct, it currently won't work for this particular case because MD can't load it, because the solution pad is trying to parse the reference ItemSpecs.
Comment 4 Philippe Girolami 2011-10-26 06:00:21 UTC
So if you have 1/2 the solution built (at least experimentally), would you be able to upadate the MD pad to handle this in an upcoming release ?
Comment 5 Mikayla Hutchinson [MSFT] 2011-10-26 09:23:00 UTC
We don't have any immediate plans to do so, since it's nontrivial and there are other more commonly used xbuild features that need to be completed first. As a workaround, you could try duplicating the reference and using condition attributes directly on it.