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

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.

Related

Setting Thread.CurrentThread.CurrentUICulture suddenly seems to have no effect for me

We have a C# Click-Once application that uses Windows Forms (Yes, I know that is old, we will be creating a new application with Xamarin soon). There are a few of us, each developing in Visual Studio 2017. We share our code via TFS. I have all the latest Visual Studio updates installed and have compared my visual studio version, 15.2 (26430.16) with my co-workers. We have the same version.
Anyway, Our application is multi-user, users log in with separate accounts and we set the display language based on user-preferences, not the machine's current language. We set it using this line:
Thread.CurrentThread.CurrentUICulture = OurFormClass.UserPreferredCultureInfo;
OurFormClass.UserPreferredCultureInfo is a static method that returns our user's preferred language in a CultureInfo object.
We have been doing this for years however a few days ago I noticed that it no longer works for me. Strangely, it still works for the rest of our developers. When I log in as one of our foreign-language test-users all of my label controls and string resources are still in English. I have set a breakpoint at the above line and it is getting set to the correct language however there is no effect.
I have tried deleting my source code and pulling it back down from source control. This did not help. I even tried uninstalling and re-installing Visual Studio. This still did not help. I copied my build output to a network drive and had one of my co-workers run it. Everything was English. I had him copy his build output to the network drive and I ran it. Internationalization worked!
I really don't know what to even try from here. I am using known-good source code and a fresh install of Visual Studio. Does anyone have any ideas where I should look next?
Thanks for any help!

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

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.

How to fix vshost32.exe has stopped working without doing the same thing every new project?

Iv'e had that problem for long time and then I found the solution of disabling visual studio hosting process or enabling native code debugging every time in the properties of the project,but its been really annoying and I don't even know if I need those functions and dose it hurt my projects so I want to know if there is a solution without doing it every new project and will not have negative effect on my projects,using Visual studio 2012 express and win7 64bit.
thank you for the help.

Could not find type...Platform issues in Visual Studio

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:

Oversized Windows CE forms in Visual Studio 2008

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.

Categories