Bug 18645 - Using statements inserted in incorrect location
Summary: Using statements inserted in incorrect location
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: unspecified
Hardware: PC Mac OS
: Normal enhancement
Target Milestone: (C7)
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2014-03-30 04:32 UTC by Kent
Modified: 2016-05-16 16:50 UTC (History)
3 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Description Kent 2014-03-30 04:32:51 UTC
If using statements currently reside within the namespace such as:

    namespace Test
    {
        using System;

        ...
    }

Then resolving a namespace adds the resolved namespace to the top of the file instead of to the existing using statements:

    using System.Threading;

    namespace Test
    {
        using System;
    }
Comment 1 Ram Chandra 2014-03-31 06:07:56 UTC
I have checked this issues and I am able to reproduce this issue.

I observes that when I paste the "using System;" namespace inside the namespace declaration and resolve the namespace for the "Task" class it add the resolved namespace on the top of the class (outside of namespace declaration).

screencast: http://screencast.com/t/jomNNB0Xm2I

Environment:

Mac OS X 10.8.4
Xamarin Studio: 4.2.3 (build 60)

Build Information
Release ID: 402030060
Git revision: 30c4afc300c2a39ec5300851357ce02e49dd217e
Build date: 2014-03-05 22:09:33+0000
Xamarin addins: f8a9589b57c2bfab2ccd73c880e7ad81e3ecf044
Comment 2 Mike Krüger 2015-05-19 09:29:58 UTC
Fixed in 6.0/roslyn