none
Controls not appearing on VS2015 c# project form

    Question

  • I transferred a C# DLL project that has around 12 Windows forms to a VS2015 environment and with the exception of one small form that has only 2 controls, all of the forms are empty in the design view.

    The '..Designer.cs' content appears to be OK and I have not made any manual edits to them.   The 'form.cs' files are as expected and the project compiles and runs as expected.  My only issue is that I cannot see the form layouts in design mode so I cannot add new controls or change the properties of existing controls. (Except of course for the one form that does not have the problem)

    The only difference I can see, as shown below, is that the 'working form' (System_setup) shows just one set of field definitions in the Solution explorer, whereas all of the others (such as System_editor) have two.  That seems wrong.

    I would appreciate any advice re this.  ... Alan

    Thursday, January 21, 2016 10:51 PM

Answers

  • Hi Alan,

    Thanks for your post.

    >>I transferred a C# DLL project that has around 12 Windows forms to a VS2015 environment

    Could you please tell me which version of VS did you create these windows form projects? In VS2010 OR VS2013?

    I suggest you could create a new windows form Control Library and check whether it works well.

    1. If it still has the same error behavior for the new created windows form control library project.  I suppose there might be something wrong with your VS2015.

    Try to repair you VS2015 or install VS2015 Update1 then try it again.

    2. If it works well for the new created windows form control library project. I think the cause is probably in your windows form project.

    Since the windows form project was transferred from other version of Visual Studio. There might be some configuration compatibility issue.

    In this case, I suggest you could check the  structure in .csproj file (Right click the project->Unload the project->Right click the project->Edit the .csproj)and make sure the structure of the application is correct.

    If still no help, you may need to add a new empty solution and copy the files from the windows form project into the new solution then try it again.

    In addition, if your windows form project was created in old version of VS like VS2008.

    In this case, there exists some compatibility issue since VS2015 don’t support such projects created in old version.

    You could refer to the following document about Porting, Migrating, and Upgrading Visual Studio Projects:

    https://msdn.microsoft.com/en-us/library/hh266747.aspx

    And also please take a look at it this document about Visual Studio 2015 Compatibility

    https://www.visualstudio.com/en-us/products/visual-studio-2015-compatibility-vs.aspx

    Best Regards,

    Lake Xiao

    • Marked as answer by Alan4949 Monday, January 25, 2016 12:24 AM
    Friday, January 22, 2016 6:57 AM
    Moderator

All replies

  • Hi Alan,

    Thanks for your post.

    >>I transferred a C# DLL project that has around 12 Windows forms to a VS2015 environment

    Could you please tell me which version of VS did you create these windows form projects? In VS2010 OR VS2013?

    I suggest you could create a new windows form Control Library and check whether it works well.

    1. If it still has the same error behavior for the new created windows form control library project.  I suppose there might be something wrong with your VS2015.

    Try to repair you VS2015 or install VS2015 Update1 then try it again.

    2. If it works well for the new created windows form control library project. I think the cause is probably in your windows form project.

    Since the windows form project was transferred from other version of Visual Studio. There might be some configuration compatibility issue.

    In this case, I suggest you could check the  structure in .csproj file (Right click the project->Unload the project->Right click the project->Edit the .csproj)and make sure the structure of the application is correct.

    If still no help, you may need to add a new empty solution and copy the files from the windows form project into the new solution then try it again.

    In addition, if your windows form project was created in old version of VS like VS2008.

    In this case, there exists some compatibility issue since VS2015 don’t support such projects created in old version.

    You could refer to the following document about Porting, Migrating, and Upgrading Visual Studio Projects:

    https://msdn.microsoft.com/en-us/library/hh266747.aspx

    And also please take a look at it this document about Visual Studio 2015 Compatibility

    https://www.visualstudio.com/en-us/products/visual-studio-2015-compatibility-vs.aspx

    Best Regards,

    Lake Xiao

    • Marked as answer by Alan4949 Monday, January 25, 2016 12:24 AM
    Friday, January 22, 2016 6:57 AM
    Moderator
  • Hello Lake Xiao,

    Thank you very much for your reply.   My project was originally created in Visual Studio 2010 Professional, and new forms created in the converted project are fine.

    Your point 2 gave me the solution.

    Only the first form had the  "<DependentUpon>UserControl1.cs</DependentUpon> construct and when I added it to a form where it was missing the controls appeared.

    Again, thanks for you quick response (I was away travelling for a few days, hence my delayed reply)

    best regards,  Alan

    Monday, January 25, 2016 12:31 AM