Visual Studio with Xamarin rendering display in designer taking a long time - c#

I've been trying to put together a simple Androind app so that I can get familiar with Xamarin inside VS2015. When I open the default Main.axml file it renders in the designer properly and I can drag buttons and other items to it. But if I switch to source and then back to the designer it never renders again, the progress bar just sits there spinning.
The only way to render the page in the designer is to shut down VS2015 and restart it. The design will work until I try to switch to source and back again.
Using VS 2015 on Windows 10

After an email exchange with Xamarin I have installed their beta version. The problem appeared to go away and everything worked properly. Unfortunately it still happens just much more infrequently.

Related

Cannot Open Form [Design] View in Windows Desktop Form .NET Core Application

When I create a new Windows Desktop Form Application using .NET Core with the latest Visual Studio 2019 Community Edition update, I cannot view the design view of the form, i.e., Form1.cs[Design]. When I click on the appropriately labeled Form1.cs file, it only opens up the code view.
New Solution Open Form1.cs code view only
Edit: At the time the question was asked Microsoft hadn't released the visual designer for WinForms in .NET Core in Visual Studio 2019. It needed a separate preview install. By May 2020, Visual Studio version 16.6, the designer was still in preview but could be enabled from Tools/Options/Environment/Preview Features/'Use the preview Window Forms designer for .NET Core apps' without needing an install.
As of November 2020 the designer is still in preview, but is enabled by default in projects in Visual Studio 2019 version 16.8 and later. It's still not complete, particularly re data binding, but the number of issues is much smaller. It can now be disabled via the Tools/Options menu as discussed above.
Took me a while, but...
Apparently, according to this page, you can bring up form designer in the following mysterious steps:
In the Solution Explorer, look for the head toolbar,
Find the icon that looks like an empty HTML tag: <>
When you click it, it will disappear, which makes no sense, but then,
Your plus signs (tree expand buttons) on the left side of the files will be gone too - that's a good sign:
Now you can doubleclick on your Form1 (or whatever it's called),
And after a few seconds of thinking, it will open the Form Designer.
Why this?... I literally have zero idea. But it worked for me.
Maybe tomorrow I'll find out more about this and yes I promise to come back and update - until then, just follow this little yellow brick road. I hate the fact that in 2021 some of the modern tools require dark sorcery to operate on a basic level, but hey. We're in this together.
Good luck!
This thread is the first when requesting "c# visual studio 2019 cannot open designer", so the solution may be useful for those who have encountered an error when the WinForms constructor stopped opening in VS2019.
The screenshot shows the steps to DISPLAY the ERROR that caused WinForm to stop displaying
I found this trick worked for me:
Right click your project in Solution Explorer and select 'Unload Project' from the context menu (near the bottom).
Right click again and select 'Load Project'
Now when you double click on your form class, it opens in the design editor

Winform cannot be edited without fully breaking layout (2017 to 2015)

As I left home for a weeks holiday I decided to quickly zip+copy a project I have been working on from my pc to my laptop. It is a c# winforms application that I have been creating on my PC using visual studio 2017 community.
My laptop however uses visual studio 2015. If I just open the project on my laptop and run it, everything is fine. However the slightest change to the form (IE anything that causes it to save?) and when I run the application half my controls now anchor off the right hand side of the screen and are out of view.
I can restore the project back to working by replacing Form1.designer file with the original from my zip and rebuilding - but again any changes after that break it in the same way. The bizarre thing is the form looks absolutely perfect IN the designer, both when opened and unchanged and after changing regardless of how it looks when the program is executing.
Completely baffled and thinking I'm going to lose a week of leisurely work - any ideas as to what may cause this? I could try installing 2017 to see if its a going backwards problem but the free wifi at my location is.. lacking.

Sample "Phoneword" project - Empty app view on deploy

The title says it all, I was just beginning learning Xamarin and installed VS Community 2015 and Xamarin.Android. I was guided by this link.
I started the sample project, the Phoneword app flashed on my Android 5.1 Oppo but not with the elements (e.g. Text Field, Button, etc).
Any ideas?
It just happened that Visual Studio by default comments out the line of code that set the main layout as the current Activity layout. Its now working all fine except that I need to find another software for the emulator because its taking me forever to boot one. Thanks!

Visual Studio 2015 XAML files freezing

I've recently updated the version of VS from 2013 to 2015. I work on WPF and obviously, I have to modify *.xaml files; every time I leave a .xaml file Visual Studio freezes for about 15-20 seconds. I cannot work like that! I've uninstalled Reshaper, but no change. I've closed even the designer process, but still - no success.
When I try to run VS without administrative rights it freezes even more (about 30 seconds). If I try to open the same solution with VS2013 it works very well.
Station details:
12 GB RAM,
i7 2.5GHz,
SSD,
Windows 10 x64
Does anyone face the same problem? How to solve it?!
It is not a plugin problem, VS2015 seems a little buggy to me. You can update to the latest version (Update 3), which works much better for me.
I think the problem is that VS added support for many different frameworks in a short amount of time. It's normal that the version is buggy, but I'm sure they will solve it with the updates.
If you can work without designer, try opening and editing just the source (XAML) code. Personally, I find it easier to work with XAML source and intellisense than using a VS XAML designer.
To do this,
right click on a XAML file
select Open with...
select Source Code (Text) editor
if you like this mode, click Set as Default to always open just XAML.
If you need designer later, you can open in designer mode by selecting XAML Designer or Automatic Editor Selector.
"was having similar issue with 2015 pro. During the simplest of changes it would take forever. What I did was go under debug\options\web forms designer\ (turned off refactoring). This solved all my issues, not there is no delay while working, only when I do a build or switch to another section or form, it will write all changes at once."
source: http://blog.geocortex.com/2007/12/07/slow-visual-studio-performance-solved/

Mahapps slows down WPF application

Since I added Mahapps to my WPF application it slowed down dramatically: it takes 5 times longer than before to start up and while editing the XAML code, Visual Studio often waits for 10 seconds or more while I'm typing.
Is this normal or are there tweaks to speed it up?
I'm using C# 4.0 on Win7 64bit.
Have same issue when I included the Icons.xaml file. But I deleted all content from that file and just put only those Icons/content which I required/needed for the project. For now its working fine..
If your having problems with the XAML in the designer perhaps you can try reloading it:
Press Ctrl+Shift+Esc
Navigate to the Processes tab.
Kill XDesProc.exe
This will reset the Designer, if that don't work try rebuilding the solution.
If you are using NuGet package to install you could try uninstalling and installing again.
You could also look at your performence tab. You wil find it under Ctrl+Shift+Esc aswell.
Look at your memory and processor to see if its constantly peeking while you are running Visual Studio.

Categories