Upstream Release: Microsoft Visual Studio 2015 RTM

BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
edited September 2015 in Visual Studio

I will close this discussion now for simplicity because today's (Sep 11, 2015) Cycle 5 – Service Release 4 brings fixes to the Stable channel for all of the VS 2015-specific issues that were being tracked in this thread.

Please discuss any new issues in XamarinVS (in any version of Visual Studio) in the general XamarinVS release announcements. Today's XamarinVS release announcement can be found here:
http://forums.xamarin.com/discussion/50353/stable-release-xamarinvs-3-11-894-cycle-5-service-release-4/p1.


Upstream Release: Microsoft Visual Studio 2015 RTM

Date published: July 20, 2015

Release notes (from Microsoft): https://www.visualstudio.com/en-us/news/vs2015-vs.aspx

Current best Xamarin version to use with VS 2015

"Stable Release: XamarinVS 3.11.836, Cycle 5 – Service Release 3" or higher.

(Xamarin for Visual Studio "Cycle 5 – Service Release 3" includes some specific fixes for Visual Studio 2015 that are not included in the previous "Cycle 5 – Service Release 2" version.)

Guidelines for this thread

  1. This first post will be updated regularly.

  2. Hopefully this thread will help answer "what might break if I update to this release?"

  3. If you find a new problem that is specific to Xamarin after you update to Visual Studio 2015, please provide as many details as you can about how to reproduce the problem. You may reply directly in this thread or contact the Xamarin Support Team via email.

  4. Please discuss older bugs that are unchanged in this release compared to Visual Studio 2013 Update 4 either with the Xamarin Support Team via email or directly in Bugzilla.

  5. Of course for questions and discussions about topics other than bugs, feel free start new forum threads.

Known issues for Xamarin, with more common or severe issues near the top

  • Upstream Visual Studio bug here, Xamarin tracking bug here: Bug 32977 - [Visual Studio, upstream] VS 2015 hangs or crashes under certain circumstances when working on Xamarin.Forms projects. This appears to be an upstream bug in VS 2015 itself that is exposed by Xamarin's change to using Visual Studio's built-in IntelliSense for XAML pages starting in VS 2015 + Xamarin.Forms 1.5.0. Candidate fix now available in the Beta channel: the new Beta version switches XamarinVS back to using Xamarin's own Xamarin.Forms XAML IntelliSense extension as a temporary fix while waiting for the next update of VS 2015 from Microsoft. (Old possible partial workaround: disable the XAML IntelliSense (see the post later in the thread for additional details):

    1. Download devenv.pkgundef to C:\Program Files (x86)\Microsoft Visual Studio [VSVERSION]\Common7\IDE\
    2. Run devenv /updateconfiguration from a developer command prompt (for the relevant VS versions).

    (If you have ReSharper, it might be possible to enable ReSharper's XAML IntelliSense as a replacement for the built-in IntelliSense after these steps.))

  • Bug 32622 - [XamarinVS] IntelliSense shows errors in VS 2015 when referencing certain types in app projects from PCL projects (due to the new Roslyn-based IntelliSense in VS 2015). (This one is a bug in the XamarinVS extensions themselves. It only affects VS 2015. Candidate fix now available in the Beta channel. After updating you might need to delete the hidden .vs folder in the solution directory to force an IntelliSense refresh. Also be aware that Bug 32988 (mentioned below) has a different root cause and is not yet fixed. (Old workaround: see Comment 4 on the bug report.)

    Example error messages:

    • "The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0"
    • "The type 'Expression<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Linq.Expressions, Version=4.0.0.0"
  • Bug 32988 - [Xamarin.Forms] Modifying XAML files causes IntelliSense for references to other PCLs to fail in the .xaml.cs code behind files with errors of the form "are you missing an assembly reference?" (This is a bug in Xamarin.Forms. It affects all versions of Visual Studio.) This seems to be another side effect of the same changes between Xamarin.Forms 1.4.3 and 1.4.4 that caused Bug 32341. Possible workaround: Downgrade to Xamarin.Forms 1.4.3.x (or earlier).

  • Bug 32341 - [Xamarin.Forms] IntelliSense on code behind files for XAML pages is not available for InitializeComponent() or for elements of the XAML page that include the x:Name attribute. (This is a bug in Xamarin.Forms. It affects all versions of Visual Studio.). Now fixed in Xamarin.Forms 1.4.4.6392 and higher. Also important: If your project contains any Xamarin.Forms XAML pages that still use the outdated MSBuild:Compile Custom Tool, you will also need to update them to use MSBuild:UpdateDesignTimeXaml (see Bug 32987 for additional details). (Old possible workarounds: Downgrade to Xamarin.Forms 1.4.3.x (or earlier), or try changing:

    <Target Name="UpdateDesignTimeXaml"
    Condition="'$(UseHostCompilerIfAvailable)' == 'true'" DependsOnTargets="Compile"/>
    

    ... to:

    <Target Name="UpdateDesignTimeXaml"
    Condition="'$(UseHostCompilerIfAvailable)' == 'true'" DependsOnTargets="PrepareResources; Compile"/>
    

    ... in packages\Xamarin.Forms.1.4.4.*\build\portable*\Xamarin.Forms.targets)

  • [Xamarin.Forms] IntelliSense in VS 2015 does not work within XAML pages themselves, as discussed in the first comment on http://forums.xamarin.com/discussion/46185/visual-studio-2015-intellisense-regression-when-editing-xaml-files/p1. (This is a bug in Xamarin.Forms caused by a change in the "ownership" of IntelliSense from the XamarinVS extensions into the Xamarin.Forms NuGet package. It only affects VS 2015.) Now fixed in Xamarin.Forms 1.5.0-pre1. (Old workaround: see the two "answer" posts in that thread here and here).


EDIT Aug 11: Add a specific bug number for the VS hanging issue: Bug 32977.
EDIT Aug 12: Add information about outdated MSBuild:Compile Custom Tool for Bug 32341. Add Bug 32988.
EDIT Aug 12: Add upstream VS bug for the hanging and crashing issue, and update wording accordingly.
EDIT Aug 16: Add new steps to deactivate XAML IntelliSense for Bug 32977.
EDIT Aug 20: Update workaround instructions for Bug 32977.
EDIT Aug 25: Candidate fixes for Bug 32977 and Bug 32622 now available in the Beta channel.

«13

Posts

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Comment 4 from the bug report does not fix the intellisense errors.

    Carried out steps 2,3,4 (1 and 5 don't apply).
    Opened solution, opened a view model that references classes in my core pcl.
    Build, no errors reported (see 1st screenshot)
    Open a Xaml file that references classes in my core pcl, made a small change (removed a line).
    Switch back to View Model, errors appear for every referenced namespace, class or class member.
    See attached screenshots, before and after.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    And Visual Studio has hung/crashed again after doing not much in particular with the usual 'Visual studio is Busy' message. See attached screenshot.
    Probably happens several times an hour.

    I really hope this can be fixed soon as it is crippling me.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    And again few minutes later.

    Seems to happen when I switch from a xaml file to a view model cs file.

    Unable to develop at all really. Please can you make this extremely urgent and endeavour to provide a fix ASAP.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited August 2015

    If you get a chance, you can try collecting a stack trace for the hang as described in the first post in the thread:

    ... collecting a stack trace from the frozen instance of VS...

    It should at most only take a few minutes to run through the steps to collect the stack trace. See the first post in the thread for the steps.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Will do. I have also just tried this on W10 with latest update above with same results.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited August 2015

    For the IntelliSense issue:

    errors appear for every referenced namespace, class or class member

    I'd be curious to see the precise IntelliSense error messages reported for these red underlines under the "View -> Error List" window. (You can switch the display mode for the Error List to "IntelliSense Only".)

    Additional notes that might be informative

    • It is important to replace both the Xamarin.Android and Xamarin.iOS targets files with the new versions, even if you're only currently working on one type of project.

    • (Also affects VS 2013) IntelliSense in Xamarin.Android projects currently behaves differently from Xamarin.iOS projects. For Xamarin.Android projects it is necessary to build the project once and then close and reopen the solution to get IntelliSense to work as expected. See Bug 30844, Comment 6.

  • PhilipGruebelePhilipGruebele USMember ✭✭

    I just updated https://bugzilla.xamarin.com/show_bug.cgi?id=32341 because it still happens...

  • jonathanyatesjonathanyates GBMember ✭✭✭

    @BrendanZagaeski

    I followed the steps to get a stack trace when it hangs. See attached screenshot. Not much help I'm afraid. Nothing reported in CallStack.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    @BrendanZagaeski

    And here is a screenshot of the Intellisense errors, 442 of them !!!

    I did the workaround for both iOS and Android. Makes no difference at all.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    For reference please see my solution structure in the attached screenshot.
    As you can see I have a Core PCL (Silkwen.Mobile,Core) and an app specific PCL (Silkweb.Mobile.MountainWeather). MountainWeather references Core and classes in MountainWeather use classes in Core. A normal project reference set-up. On loading the solution all is good. After editing a Xaml file that also references Core the errors appear in the code files.

  • PhilipGruebelePhilipGruebele USMember ✭✭

    1.5.0.6396-pre1 + XamarinVS 3.11.836, Cycle 5 + VS2015 is a bit of a disaster on my machine. I deleted all obj and bin folders, but I have intellisense problems and xaml crashing problems, and xaml hanging problems. I tried getting the xaml hanging call stack but it takes too long to attach and I can't get the call stack.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    @jonathanyates,

    Not much help I'm afraid. Nothing reported in CallStack.

    You can right-click the "[External Code]" and select "Show External Code". I'll update the steps in the gist to mention that trick.

    And here is a screenshot of the Intellisense errors

    Thanks. So the "good" news is that those are not the same kind of IntelliSense errors as in Bug 32622 (they don't mention "You must add a reference to assembly"). They look like they might be problems with the generated .g.cs files not being updated or reloaded into IntelliSense properly. At first pass, that sounds similar to Bug 32341, but it now seems there might be a second problem that closely resembles Bug 32341. As discussed in Bug 32341, Comment 5, the best way to proceed with this remaining issue will be to provide the Xamarin developers with a test case that reproduces the problem. I have filed a preliminary bug report where you can attach the test case if you get a chance: https://bugzilla.xamarin.com/show_bug.cgi?id=32944. Thanks!

  • jonathanyatesjonathanyates GBMember ✭✭✭

    @BrendanZagaeski

    See attached screenshot of call stack. Sorry I forgot to copy the call stack text before I force quit VS. Hope this is enough.

  • ScottNimrodScottNimrod USMember ✭✭

    @jonathanyates
    Just upgraded to latest alpha and can no longer open up my solution.
    The solutions loads half way and then hangs until the VS2015 crash dialog gets displayed, prompting me to close the solution.

    As a result, I am unable to continue work because I am unable to open my solution.

  • jonathanyatesjonathanyates GBMember ✭✭✭
    edited August 2015

    @ScottNimrod Can you try the Beta.

  • ScottNimrodScottNimrod USMember ✭✭
    edited August 2015

    @jonathanyates
    I'm not sure how to manage nuget packages without my solution being loaded.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    @ScottNimrod

    Tools > options > xamarin > switch to beta channel

  • ScottNimrodScottNimrod USMember ✭✭
    edited August 2015

    @jonathanyates
    I installed the beta.
    However, the issue still exists.
    I'm not quite sure what else to do.
    I have approximately 35 projects in my solution.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Did the solution load?

  • ScottNimrodScottNimrod USMember ✭✭

    No. It loads a quarter of the way and hangs.
    I have restarted my machine as well.

  • ScottNimrodScottNimrod USMember ✭✭

    I deleted the suo file and the solution now loads.
    Thanks.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Just to confirm. I have suspended R# and the problem persists.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    I have tried to replicate this in a very simple XF project with two PCL's and can not replicate the crashing. So I have no idea why it is occurring.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Although intellisense errors are very easy to replicate. All I needed to do was add a namespace declaration in a xaml page to a core namespace. Switch back to view model and voila, intellisense errors everywhere.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Another thing worth noting is that I am using xcc conditional compilation so I can have design time intellisense for bindings using d:DesignContext={DesignInstance... I doubt this is the cause but you never know. I am very loathed to try removing this as I have this in every single xaml file so it's removal would be a major task.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Thanks for the screenshot of the stack trace for the hang. I have now filed a preliminary bug report for that issue: Bug 32977. As noted on the bug report, the fact that the call stack does not mention any Xamarin assemblies suggests that this hang might be within Visual Studio 2015's XAML language support itself, but I don't know enough about the internals of how the XAML language support works to say for certain that the XamarinVS team will not be able to stop the problem somehow.

    If you can get ReSharper to completely disable Visual Studio's built-in IntelliSense for XAML, there's a chance that might be sufficient to avoid the problem.


    For the issue with IntelliSense errors (Bug 32944), I have a new lead for investigation that I will look into shortly: Bug 32439. That said, it still wouldn't be bad to attach a test case on Bug 32944 if you have one handy.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    @BrendanZagaeski

    Thanks for the update.

    It's definitely not r#. I had this disabled and the crash and intellisense errors still occur.

    Test case to replicate intellisense errors is easy.

    • Create new XF project and and another Core PCL.
    • Add some classes to the Core PCL, perhaps ViewModelBase
    • Create a vm in the project pcl, inherited from ViewModelBase in core.
    • Create view (ContentPage will do) in project pcl and set binding context to VM.
    • Normal setup so far. Build and all is ok.
    • Now in the view add a namespace reference 'xmlns' to core.
    • Switch to ViewModel and BOOM, errors will appear.

    As for VS hanging, which is a bigger issue for me, I really haven't a clue. But, this did not happen in 2013.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Hang / crash

    It's definitely not r#. I had this disabled and the crash ... still [occurs].

    The guess would in fact be the reverse of that. The thought is that enabling R# and asking R# to disable the built-in Visual Studio IntelliSense might fix the hangs (because it would hopefully avoid the chain of method calls shown in the screenshot you collected). (If it changes the call stack, that might be interesting to know too.)

    this did not happen in [VS] 2013.

    That is as expected. To borrow some wording from the bug report: "VS 2013 uses Xamarin's custom Xamarin.Forms XAML IntelliSense extension, rather than Visual Studio's built-in IntelliSense."

    In contrast, Xamarin.Forms XAML IntelliSense in VS 2015 does use VS's built-in IntelliSense. One possible workaround the XamarinVS developers are contemplating is to enable VS 2015 support for the old custom Xamarin.Forms XAML IntelliSense extension.

    IntelliSense errors

    Test case to replicate intellisense errors

    I had some luck reproducing an issue that might match what you're seeing. (I wasn't seeing the problem when I first tried to follow the steps with a new template app, but then I switched to using the "XLabs.Sample" app based on a tip from Philip.) It looks like the error messages approximately match your screenshot from earlier.

    The new bug report is here: Bug 32988. I have accordingly updated both the first post in the thread and the old "preliminary" bug report with additional details and possible next steps.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    @BrendanZagaeski

    Thanks for the update.

    I completely isolated my project to my vm c drive and removed R# and still then hanging occurs, regularly.

    Regarding the intellisense errors, there is no need to use XLabs or whatever. Attached is a fairly vanilla solution which exhibits this behaviour which I use for the above test case. Load and do exactly as instructed above. The errors will occur.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    @BrendanZagaeski

    Hanging appears to occur whenever a file transaction occurs, saving, updating, adding etc.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Actually, I think that is wrong cos I opened my solution, opened a xaml file and VS hung, again!

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    I have updated the info about the hang/crash in the first post in the thread based on some new information I received from the Xamarin developers.

  • jonathanyatesjonathanyates GBMember ✭✭✭
    edited August 2015

    @BrendanZagaeski

    Have you managed to reproduce the crash at all.

    I am now at the point where I now have to revert back to VS2013 and refactor all the code that I'd updated to C#6. I have now given up on 2015 as I can not develop with it. This is going to be a bit painful but at least I can progress to release, after which I very much doubt I will ever use Xamarin again. It has to be the worst development experience I have encountered. Way too many problems for the price. We are developers, not Testers!

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited August 2015

    Did you check the link to the upstream bug in the update to the first post that I just mentioned? Or see the same link in the latest comments on the bug report?

    https://connect.microsoft.com/VisualStudio/feedback/details/1655363/vs-crashes-when-editing-xaml

    This is a bug filed by the Xamarin.Forms team against Visual Studio 2015 RTM itself that includes a test case that reproduces a crash 100% of the time.

    For now I'd recommend contacting the Support Team via email if you have additional points (outside of specific new bugs seen in VS 2015) you'd like to discuss since I'm just one member of the support team (not anyone in charge of release strategy), and my available time to send replies on the forums is limited.

    See my comment on the Cycle 5 – Baseline release thread from April 29 for the extent of my knowledge about Xamarin's efforts to mitigate the number of regressions in the future.


    EDIT: Added a little extra clarification. Feel free to continue to report any new issues you see in VS 2015 compared to VS 2013 in this thread.

  • opiantsopiants NZMember ✭✭
    edited August 2015

    Voted as important. I confirm that I can reproduce it every time as well. I encourage everyone who's affected by this to vote it as important to put more pressure on Microsoft.

  • NigelSampsonNigelSampson NZMember

    I'm seeing a couple of problems with Visual Studio 2015 Enterprise, with the version of Xamarin that is installed by the VS installer (3.11.816)

    The first is a 100% reproducible lock up when trying to add a layout to \Resources\layout for Android.

    The second is that I cannot package any application, build is successful but when I try to create the package I get an error complaining of syntax errors in \obj\Debug\android\src\hubb\native\app\android\R.java.

    Processing: obj\Debug\res\layout\main.xml
    Processing: obj\Debug\res\values\strings.xml
    C:\Program Files (x86)\Java\jdk1.7.0_55\bin\javac.exe -J-Dfile.encoding=UTF8 -d obj\Debug\android\bin\classes -classpath "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v5.0\mono.android.jar" -bootclasspath "C:\Program Files (x86)\Android\android-sdk\platforms\android-21\android.jar" -encoding UTF-8 "@C:\Users\nigel\AppData\Local\Temp\tmp2A95.tmp"
    error: expected
    package hubb.native.app.android;

    error: class, interface, or enum expected
    package hubb.native.app.android;

    error: class, interface, or enum expected
    package hubb.native.app.android;

    Build FAILED.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    @NigelSampson,

    The first is a 100% reproducible lock up when trying to add a layout to \Resources\layout for Android.

    That is Bug 32845, which unfortunately affects all versions of Visual Studio.

    The second is that I cannot package any application

    Thanks for the report. I have filed the preliminary description of the problem on Bugzilla for tracking and visibility to the engineers: Bug 33044. I included several questions about additional information to gather, if you get a chance.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    @BrendanZagaeski

    I have removed all copies of the metadata files Xamarin.Forms.Xaml.Design.dll and Xamarin.Forms.Core.Design.dll from the packages folder and still the hanging/crashing persists. This seems to make no difference at all other than bringing back the blue underlining throughout my Xaml.

    All I did was edit some stuff, then tried to open a xaml file and BOOM again, Visual Studio hangs!

  • jonathanyatesjonathanyates GBMember ✭✭✭

    And crashed again trying to add a file.

    Reverting to 2013. I've had enough of this.

This discussion has been closed.