locked
Problem after copying a solution RRS feed

  • Question

  • Hi,

    (I'm in the learning VB.NET process...)

    I have created a solution where no problems occur when debugging.

    After copying the complete solution to another folder i cannot debug this solution.
    I receive an error "Public Property DisplayName As String' and 'Public ReadOnly Property DisplayName As String' cannot overload each other because they differ only by 'ReadOnly' or 'WriteOnly'." in the web.g.vb file.

    I deleted the web.g.vb file and build the solution but this does not solve the problem.

    (The original solution debugs withoud any problem)

    Can anyone provide me some advice on how to solve this problem?

    Kind Regards,
    Peter

    Monday, October 11, 2010 2:49 PM

Answers

  • Problem solved :-)

    By copying the solution the reference to the WCF RIA Service link got broken.

    Solved the problem by setting the WCF RIA Service link to <No Project Set>, In the Client projects properties (resulting in a load of errors)

    Then set the WCF RIA Service back to the initial ****.Web and all problems where gone

     

    Kind regards,
    Peter

     


    ***
    • Marked as answer by Pebe_ Monday, October 11, 2010 5:58 PM
    Monday, October 11, 2010 5:58 PM

All replies

  • So you have two properties and as listed above one is "public property displayname as string" which has Get and Set signature. The second property, "public readonly property displayname as string" has only Get signature, but the first property also has get signature which is probably what is causing conflict. I either recommend to remove the readonly property or define the first property as write only. Otherwise, I would just rename one of your properties or remove your project's .dll directive and then rebuild the solution.

    • Proposed as answer by zqxw Monday, October 11, 2010 3:36 PM
    Monday, October 11, 2010 3:36 PM
  • Some additional info...

    Created a Silverlight Business application. (withoud adding any page or code...)

    Debug it and runs withoud any problem.

    Copy the complete solution files and folders to another location, copy of application will nog debug > run into the error at build...

    It seems to be a conflict between the Weg.g.vb file and the User.Shared.vb file

    where Web.g.vb contains a: Public Property DisplayName() as string
    and
    User.shared.vb containg a: Public ReadOnly Property DisplayName() As String

    This is all generated code, so I don't know how to solve this...

    Kind regards,
    Peter

     


    ***
    Monday, October 11, 2010 3:47 PM
  • There are a few more things that we need to establish. What version of VS and SL are you using? What location are you moving your content to?...
    Monday, October 11, 2010 3:52 PM
  • I am copying the complete folder containing the solutions files (client and web) to antother folder withing the main folder all the projects are saved.
    ***
    Monday, October 11, 2010 3:59 PM
  • Sorry, forgot to mention the version i'm using

    VS2010

    SL 4.0


    ***
    Monday, October 11, 2010 4:08 PM
  • Problem solved :-)

    By copying the solution the reference to the WCF RIA Service link got broken.

    Solved the problem by setting the WCF RIA Service link to <No Project Set>, In the Client projects properties (resulting in a load of errors)

    Then set the WCF RIA Service back to the initial ****.Web and all problems where gone

     

    Kind regards,
    Peter

     


    ***
    • Marked as answer by Pebe_ Monday, October 11, 2010 5:58 PM
    Monday, October 11, 2010 5:58 PM