Bug 5126 - Multiple projects including the same files don't update their typesystem properly
Summary: Multiple projects including the same files don't update their typesystem prop...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-05-16 11:35 UTC by Alan McGovern
Modified: 2012-05-18 04:41 UTC (History)
1 user (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 Alan McGovern 2012-05-16 11:35:15 UTC
1) Create ProjectA which contains a bunch of source files
2) Create ProjectB which contains the same files, added as links
3) Create a project Foo which references ProjectA
4) Create a project Bar which references ProjectB

If you open a file which is listed under ProjectA in the solution pane and make changes, project Foo is updated correctly and sees the changes. However the type system in Bar is not updated until you close the file and open it using the item under ProjectB in the solution pane. This makes MD realise the file in ProjectB has changed and so it updates the type system in Bar.

The other alternative is to restart MD. This fixes the issue too.
Comment 1 Alan McGovern 2012-05-16 11:44:09 UTC
Sorry, my mistake. In this scenario we have a directory which contains two independent csproj files (one monotouch and one desktop) which contain the same source files.
Comment 2 Mikayla Hutchinson [MSFT] 2012-05-16 14:49:52 UTC
Updated title to match your new comment, is that more accurate?

Did you save after making the changes?  I wouldn't expect unsaved changes to propagate to the other project, but saving should cause a fileservice event, which should cause all projects to reparse the file.
Comment 3 Alan McGovern 2012-05-16 18:59:27 UTC
Yes, the files were saved. The inconsistent state lasts after multiple saves and rebuilds.
Comment 4 Mike Krüger 2012-05-18 04:41:42 UTC

(btw. unsaved changes do propagate to other projects as well and the file is only parsed once for all projects - repasing it N times isn't needed)