I'm developing a Windows CE CF3.5 application under Visual Studio 2008, everything went smooth until the designer started throwing a NullReferenceException. Restarted VS2008, rebooted Win7 and the exception disappeared but all the forms for the project I was working on and new projects that I tested have this aspect:
On the emulator it varies, it either appears really tiny in the upper left corner or it displays correctly:
Any ideas? I've googled for this to no success. Thanks in advance!
In the solution explorer, expand your form and open the Form.Designer.cs file.
Have a look and try altering the AutoScale and AutoScaleDimensions properties
Like every good programmer you use some kind of Source Control (VSS, SVN, Git, etc.).
So simply make a diff of your current not working version and your last working one and see what changed.
Related
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
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.
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/
I just jumped back into a project that previously had no issues. We just upgraded to visual studio 2012. This morning I open my project to work on my code. I am getting designer issues all over the place.
"If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU"
It all seems to be coming from this platform issue. I have had zero issues in the past. I cannot find any information on how to fix this. I even go to open the designer on a file that previously worked (pre VS2012 install) and that fails.
So I went back to VS2010...without changing anything and attempted to open the same designer on the same file that previously worked and I also get an app crash.
Did somehow my visual studio 2012 install cause all of this?
Make sure that you are choosing the right CPU architecture for your designer. If it is ARM then you might see that message. You can check your CPU settings for your project like this:
I'm working on a Windows Store App in Visual Studio 2012 and decided it might be easier to start using blend for the interface and layout. But in my attempts to make this layout design easier for myself, I have run into a problem with the design view. The error message is that design view is unavailable for x64 and ARM platforms.
I'm familiar with this error from Visual Studio but I was just wondering if there's a simple way to change the target platforms so I can see the design view in Blend?
I know there have been problems with blend for VS 2012 up until now, but I thought maybe this was an easy one to fix that I'm missing somewhere.
If anyone knows a way to fix this I'd really appreciate it.
Thanks!
Close Blend
Open the project in Visual Studio 2012
Change Release/Debug Configuration to Any CPU or x86
Save All in Visual Studio to make sure it saves the project
(The Project does not save when you run!)
Reopen the document in Blend
That's it!
Just go to Build->Configuration Manager and change the Platform to 'Any CPU'.
Additionally you can enable the 'Solution Platform' dropdown in the toolbar by clicking the little down arrow right to the debugging Toolbar items then click 'Add remove buttons' and select 'Solution Platforms'.
Change .NetFramework from 4.5 to 4.0
You would need to install windows phone sdk for blend to work correctly in your application.
http://www.microsoft.com/en-us/download/details.aspx?id=35471