Bug 1316 - default generated namespace for new files is incorrect
Summary: default generated namespace for new files is incorrect
Status: RESOLVED INVALID
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-10-06 12:58 UTC by Alan McGovern
Modified: 2011-10-07 06:50 UTC (History)
2 users (show)

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


Attachments
screenshot (248.88 KB, image/png)
2011-10-06 12:58 UTC, Alan McGovern
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 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:
Status:
RESOLVED INVALID

Description Alan McGovern 2011-10-06 12:58:19 UTC
Created attachment 625 [details]
screenshot

I added a new file to monodevelop and the namespace was weird:

Generated: namespace MonoDevelop.MacDev.MonoDevelop.MacDev.PlistEditor
Expected: namespace MonoDevelop.MacDev.PlistEditor

See screenshot.
Comment 1 Mikayla Hutchinson [MSFT] 2011-10-06 17:08:23 UTC
Look at the project's default namespace settings.
Comment 2 Alan McGovern 2011-10-07 06:41:58 UTC
It's 'MonoDevelop.MacDev'. I would expect that if the default namespace were set to 'MonoDevelop.MacDev' it would notice the duplication when appending the name of the directory as part of the namespace. Maybe this is not the desired behaviour but it's what I expected.
Comment 3 Mikayla Hutchinson [MSFT] 2011-10-07 06:50:32 UTC
Looking at the project options, it's set to use the default namespace with the directory name appended. the problem is that some of the directories were set up as if it were simply based on the directory.

The problem with eliminating 'duplication' is that we'd break a valid use - a duplicated namespace component - in order to work around broken project layouts like this.