Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange MsBuild Error (Everything builds fine in Visual Studio)
    primarykey
    data
    text
    <p>First off, I tried a shorter version of the code for my stackoverflow question but that doesn't cause my compiler error. Also, I can't user the AspnetCompiler instead of MsBuild because I am building a solution of multiple websites and class libraries. My build server setup has been in place for years and I have never had any problems like this. I have a VB.Net Library that I use extensively with C#, in that library I have the following:</p> <pre><code> Public Class PropertyParticipants Public Property Participants As List(Of Participant) Private _propertyId As Integer Public Sub New(propertyId As Integer) Participants = New List(Of Participant)() _propertyId = propertyId LoadParticipants() End Sub End Class Public Class Participant Public Property Role As ParticipantRole Public Property Type As ParticipantType Public Property FirstName As String Public Property LastName As String Public Property Password As String Public Property LoginId As String Public Property Initials As String Public Property UserId As Integer Public ReadOnly Property FullName() As String Get Return Me.FirstName &amp; " " &amp; Me.LastName End Get End Property Public Enum ParticipantRole Primary Party Pending End Enum Public Enum ParticipantType Seller Buyer End Enum End Class </code></pre> <p>Then in my c# code behind I have the following</p> <pre><code> PropertyParticipants propPart = new PropertyParticipants(PropertyId); foreach (Participant part in propPart.Participants.Where(p =&gt; p.Role != Participant.ParticipantRole.Pending)) { int userId = part.UserId; //this is fine string loginId = part.LoginId; //compiler error } </code></pre> <p>error CS1061: 'Participant' does not contain a definition for 'LoginId' and no extension method 'LoginId' accepting a first argument of type 'Participant' could be found (are you missing a using directive or an assembly reference?)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload