Strange problem when debugging CSLA: "There is no source code available for the current location"

Strange problem when debugging CSLA: "There is no source code available for the current location"

Old forum URL: forums.lhotka.net/forums/t/5317.aspx


stefan posted on Thursday, August 28, 2008

I receive a "There is no source code available for the current location" when I debug the Fetching of an object.
This is only happening with one specific class.
I am using CSLA 3.5.2 (from the repository) and am working with .NET 3.5 SP1.

Here is where I enter debugging...
MyCustomer.vb
  Protected Friend Shared Function GetMyCustomer(ByVal id As Guid) As MyCustomer

    If Not CanGet() Then
      Throw New System.Security.SecurityException("User not authorized to view Customer")
    End If
    Return DataPortal.Fetch(Of MyCustomer)(New Criteria(id, New MyLockingObject))

  End Function

It reaches the first ctor of LateBoundObject...
LateBoundObject.cs
    public LateBoundObject(Type objectType)
      : this(MethodCaller.CreateInstance(objectType))
    { }

It even processes CreateInstance... (the ctor of
MyCustomer runs)
    MethodCaller.cs
        public static object CreateInstance(Type objectType)
        {
          var ctor = GetCachedConstructor(objectType);
          if (ctor == null)
            throw new NotImplementedException("Default constructor " + Resources.MethodNotImplemented);
          return ctor.Invoke();
    }
But it never reaches the actual constructor of LateBoundObject... presenting the above message
    LateBoundObject.cs
    public LateBoundObject(object instance)
    {
      this.Instance = instance;
    }

Could it be that improper use of managed properties can lead to that behaviour?
I only have managed properties in MyCustomer.vb, so I think I can get away without
the _dummy member in the in-between classes...
Other objects, that do not use managed properties don't show this behaviour.
I read about a problem with the .NET 3.5 SP1 symbol files, which are not yet available,
but the code I am having trouble with, comes out of csla.dll, and is not SP1 related.

Any ideas?

Stefan



thaehn replied on Thursday, August 28, 2008

Have you built the CSLA DLLs since you updated the source code? If yes, then try choosing "Rebuild" insted of "Build" and see if that resolves your issues.

Todd

stefan replied on Thursday, August 28, 2008

Normally I choose "Cleanup Code" and then do a "Rebuild".
I have rebuilt the csla.dll and even updated the references in all of my projects.
I have removed the managed property...
And I finally replaced all references with a reference to a csla.dll built from the official 3.5.1 download.
But I still have the same issue!?

Stefan

rasupit replied on Sunday, August 31, 2008

Stefan,
You are getting this error message because you're trying to debug through a generated IL code.
http://msdn.microsoft.com/en-us/library/3sehk0fb(VS.80).aspx

Copyright (c) Marimer LLC