Visual Studio Community Copy, Paste, Undo, Search not working

Hey everyone,

The last update of xamarin and the newest version of Visual Studio Community are becoming increasingly difficult to use because a few simple bugs in the editor. Im trying to figure out if its just us and we can change a setting or if its just a bug in the editor? We are experiencing the bugs on all of our macs.

Basically everytime you copy paste anything it completely breaks your code by removing characters or obfuscating the code. For example copying this line:

#if __ANDROID__
if (ProjectMainActivity.INSTANCE == null)
{
//code
}
#endif

Will paste

#if __ANDROID__
if (ProjectMainActivity.INSTANCE == null)
{
//cod

With no end tag, no e on code, and the whole document's tabs will be completely jacked. More so when I "undo" it will undo changes done a while back, not the last thing I did.

If I search:
font-family:'flama_condensedbasic';
and replace with:
font-family:"proxima_nova_alt_rgregular";
you end up with:
f:"proxima_novaflama_condensedbasic_alt_rgregular";

Also, it will only replace HALF of the search results it finds. . . . . the rest are ignored.

if I type #if __ as if to type #if __IOS__ my cursor will move to the middle of the document and delete the block of text I was working on.

If I copy paste #if __IOS__ from somewhere else so I dont have to type it it will remove a few lines under where I am typing after I paste. There doesn't seem to be any rhyme or reason to what it chooses to remove.

Editing CSS was impossible, and even overwriting the file from another app by copy pasting was not working until I unchecked "Auto Format" under the css area of preferences. Which helped a little.

Its gotten so bad in the last update that we are using text edit to code rather than visual studio or xamarin. This is happening on fresh installs (And I mean completely fresh -- complete hard drive wipe, new OS X install 10.12.3, fresh install of visual studio community 7.0.1 or the last build of Xamarin Studio) on ALL 3 of our macs.

Any ideas here? Can I turn of some auto formatting or auto indenting? We can't be the only ones having all this trouble

Tagged:

Answers

  • JGoldbergerJGoldberger USXamarin Team, University Xamurai

    @TylerFouche

    What version are you using? In Xamarin/Visual Studio (Mac), version information can be obtained by navigating to: Xamarin/Visual Studio -> About Xamarin/Visual Studio -> Show Details -> Copy Information button.

    This sounds like a bug that was reported a couple of weeks ago that has since been fixed. I could not reproduce this in the latest stable of Visual Studio for Mac.

  • TylerFoucheTylerFouche USMember ✭✭

    Thanks @JGoldberger I am using this version:
    Visual Studio Community 2017 for Mac
    Version 7.0.1 (build 24)
    Installation UUID: f42dcf82-a406-4560-8f85-5edb31b47e57
    Runtime:
    Mono 5.0.1.1 (2017-02/5077205) (64-bit)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 500010001
    

    When I go to "check for updates" it says I am on the newest one.

  • JGoldbergerJGoldberger USXamarin Team, University Xamurai

    @TylerFouche

    OK, you are indeed up to date.

    There were several bug reports about similar issues:
    https://bugzilla.xamarin.com/show_bug.cgi?id=55128
    https://bugzilla.xamarin.com/show_bug.cgi?id=55219
    https://bugzilla.xamarin.com/show_bug.cgi?id=55510
    https://bugzilla.xamarin.com/show_bug.cgi?id=56134
    https://bugzilla.xamarin.com/show_bug.cgi?id=54992

    but all are marked as Resolved and this is the first report I see of this issue with VS for Mac version 7.0.1 (build 24)

    1. What project type(s) are you seeing this issue in?
    2. What settings do you have in the Automatic behaviors in the Visual Studio for Mac Preferences->Text Editor->Behavior settings page? A screen shot of that page would be good to get. Also screen shots for the XML, CSS, HTML, and JSON settings pages would be good.

    Here's a screen shot of the settings I have for the behaviors page:

    For the XML, CSS, HTML, and JSON settings pages I have all options selected.

  • TylerFoucheTylerFouche USMember ✭✭

    @JGoldberger Thanks!

    Yeah I see it on Shared Library Projects, iOS and Android Projects. We don't really do Forms projects. Here are my settings:

  • JGoldbergerJGoldberger USXamarin Team, University Xamurai

    @TylerFouche

    OK, that looks pretty much the same as I have for any seemingly relevant option.

    I hate to ask, but are you certain this is in Visual Studio for Mac and not Xamarin Studio? I can reproduce some copy/paste issues in Xamarin Studio but not Visual Studio for Mac, but oddly the specific case you noted, i.e. the sample code you posted,

    #if __ANDROID__
    if (ProjectMainActivity.INSTANCE == null)
    {
    // code
    }
    #endif
    

    that copied and pasted fine even in Xamarin Studio.

  • TylerFoucheTylerFouche USMember ✭✭

    @JGoldberger yes, its happening for me on both Visual Studio and Xamarin. I turned off "Smart" for tab indenting in behaviors, and all code formatting and it is somewhat better with copy/pasting. I still have a lot of trouble just editing certain things such as typing #if __ and having my cursor jump around etc.

  • TylerFoucheTylerFouche USMember ✭✭

    @JGoldberger not sure how or if its even helpful but I could upload a screen capture. May not be very helpful for debugging but thought I would offer that

  • TylerFoucheTylerFouche USMember ✭✭
    edited May 31

    I went ahead and upload a screen cap of editing some css. But it does the same behavior editing C#.

    http://crowdhubapps.com/CopyPasteBogies.m4v

    Edited: I should say it does similar behavior, in C# a lot of times it cuts off text, in CSS it will ADD a bunch of text, but sometimes it just jumbles it as well.

  • JGoldbergerJGoldberger USXamarin Team, University Xamurai

    @TylerFouche

    Thanks for the screencast, not helpful in identifying the issue but helpful in seeing the odd behavior.

    I re-opened one bug report I had file on weird copy paste issues in C# since another user said they are still hitting the issue in Vs for Mac.

    I am not sure that the CSS issue is the same as the C# issue, so you may want to create a new bug report for that, mentioning the one above as possibly related. If you do file a bug report, please do include the screen recording as well as a simple test project that can reproduce the issue.

    Also it may be good to see if when you open the first test project listed in the attachments of the above bug report in Visual Studio for mac and see if you are still getting the behavior noted in the bug description's steps to reproduce. It could be that the particular issue noted in that particular bug report is indeed fixed (I can not reproduce that particular issue anymore) and that both your C# and CSS copy/paste issues have a different underlying cause and thus are a different bug.

    Bugs can be filed at:
    bugzilla.xamarin.com/newbug
    Here are the guidelines for filing a bug report: https://bugzilla.xamarin.com/page.cgi?id=bug-writing.html
    You will have to create an account on that system if you have not already done so. There is a check box above the Submit button to set the bug as private.

  • TylerFoucheTylerFouche USMember ✭✭

    @JGoldberger looks like bugzilla.xamarin.com/newbug is gone for visual studio. Keeps taking me to a dead end on Microsoft's page. Any ideas?

  • JGoldbergerJGoldberger USXamarin Team, University Xamurai

    @TylerFouche
    Use the "Report a Problem" menu, under Help, in Visual Studio for Mac. Sorry, I did not know the newbug page no longer worked for Visual Studio for Mac.

Sign In or Register to comment.