locked
LightSwitch C# Project Computed Property Edit Method No Code Window Shown RRS feed

  • Question

  • This problem appears to be a clone of:

    http://social.msdn.microsoft.com/Forums/en/lightswitchgeneral/thread/ccca214a-cfb1-4733-9c9c-aca7c22a59d9

    Just this is on an "Established" Beta 2 project  that has been relatively bug-free and suddenly this problem appears.

    On clicking Edit Method of a "Computed Property" on my "NominalAccount" table the code window is not shown.

    Using File View I can see that file Nominal.cs has been created and for each click of my editmethod a partial class

    like below is created

    namespace LightSwitchApplication
    {
        public partial class a88fa9ca8
        {
        }
    }

    Similar problem with Write Code also.

    The only problem is the workaround to rename of the table as suggested in the above "answered" thread does not appear to work.  If you re-click the "Edit Method" all you appear to do is add another partial class named with a different 32-bit Hex number! Perhaps the fact that a Hex tag is being generated may be of significance to an MS insider. The only changes that have been made to my Windows 7 / VS2010 environment is that by Windows Update". If I create a new table and add a "Computed Property" within this project I do not have this issue.

    Your help or thoughts on this matter would be much appreciated as always.

    Thanks, Keith


    Update: This appears to happen on all existing tables in the project but not the new one's. Re-Tried, Clean and Rebuild : this cured the "Not opening code window" issue but it's still adding 32 Bit Hex tagged partials!!!!!
     public partial class a88fa9ca8
        {
        }
     
        public partial class af802b1c6
        {
        }
     
        public partial class ae4994f8f
        {
        }
    Saturday, May 14, 2011 7:39 PM

Answers

All replies

  • Tried re-install of Lightswitch in case environment had be affected. To no avail! Plan to cut down VSLS solution to a bare minimum (single table) that still demonstrates the problem, parcel up, raise issue and send an attachment to Connect site for the MS guys to play with and establish what has affected the project for this to appear in a Beta 2 environment.

    Workaround is to change the class name to that of the table as suggested in the Beta 1 postings.

     If you create a Computed Property for an existing table and VS fails to open the code file, you'll find in file view that Company.cs has been created in the Common/UserCode folder. Open this file and change

    public partial class a88fa9ca8 //
        {
    to

    public partial class Company
        {

    After making these changes you will find that the skeletal functions will be added to this class and that the file is auto-opened in VS, as normal, when you click the "Edit Method" in the Computed Property properties section or the "Write Code" button for this table within the IDE.

    Keith

    • Marked as answer by PlusOrMinus Sunday, May 15, 2011 10:27 PM
    • Unmarked as answer by PlusOrMinus Monday, May 16, 2011 10:25 AM
    Sunday, May 15, 2011 10:27 PM
  • Hi Keith,

    Wow, I wonder what triggered this on an established B2 project.

    Hopefully the team will be able to figure it out from what you send them.

    Scary stuff!

    Yann

    Monday, May 16, 2011 12:10 AM
  • Yann, Hi,

    I think I've sassed how the problem is created.

    Simply create a table, add, say, a string item, then add a Computed Property, choose to edit this Property's method all prior to saving the Table and you get this issue.

    Naturally Clever Clogs here has been doing this while designing his app,

    Could you do me a favour and run through the above just to establish that my dev environment is not screwed. (Good Engineering English!!!)

    Thanks, Keith

    PS I'll "Unmark As Answer" then perhaps we can advise all to save the table in the IDE prior to doing a "Write Code" or adding a Computed Property etc...


    Monday, May 16, 2011 10:25 AM
  • I un-installed anything to do with VS Async and it appeared to cure the problem. I'll update my Connect bug log.

    I've posted a seperate thread on the forum advising others about this issue.

    http://social.msdn.microsoft.com/Forums/en-US/lightswitchgeneral/thread/77f25f5f-8888-4d12-8832-e9c585f10e64

    Keith.

    • Marked as answer by PlusOrMinus Monday, May 16, 2011 8:09 PM
    Monday, May 16, 2011 8:08 PM
  • Hi Keith,

    Now that you've ascertained that the problem appears to be related to the Async CTP, I assume that you no longer need confirmation of the table/computed property/edit procedure you mention above?

    I ask, because I don't have that CTP installed.

    Yann

    Tuesday, May 17, 2011 12:08 AM