Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Online can't locate function in class in class library on build server

Hi I'm getting an error in the VSO log and a build failure

d:\a\src-***--\r2rJSONcall.aspx.vb (31): 'rptJSONRoutesTable' is not a member of 'r2rSearchResponse'.

And yet it is!

r2rJSONcall.aspx.vb

Public Class r2rJSONcall
 ...

  Property r2rResponse As New r2rSearchResponse
   ...

   Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


  'call the webservice..
  ...

   Response.Write(r2rResponse.rptJSONRoutesTable("EUR"))

and in a classlibrary..

Public Class r2rSearchResponse
  ...
  Function rptJSONRoutesTable(userCurrencyCode) As String

It, of course, runs locally no problem.

I've tried making a one byte change and recommitting, also the associated DLL was under source control, so I removed and add that. No Joy.

UPDATE - no, bad news the answer I posted below solved the problem temporarily. It has reared its ugly head once more and no matter what can't seem to get a build to work.

The following procedures have been tried so far to get a VSO online build to compile correctly:

1) I deleted my local folders and performed a full checkout from sourcecontrol - suggested by @MetaFight. That compiles fine locally, no files missing.

2) Excluded the /Bin and /Obj folders. So no dll's checked into source as suggested by @PhilipKendall

3) Run MSBuild locally. The solution compiles OK.

4) Renamed, and then moved function inside the classlib to try to trigger rebuild on Azure server. Still can't find the function.

5) Checked build order, Classlib is compiled first. "Clean" option selected on Build Profile.

6) Checked that references are correct. I can see the reference in the vbproj file. The reference are Project references, not file references.

7) Deleted Build Profile in Azure/VSO. Created new build defintition profile and new Web App in Azure - error reappears.

8) Tried this solution Library/Static Method not Updating in Azure No Merge error like point 3) on that page.

Any TFS/VSO experts out there can help?

like image 836
bendecko Avatar asked May 07 '15 10:05

bendecko


People also ask

How to use the class library in Visual Studio?

In order to use the class library, you must first add a reference to the library (see "How to add references to your Visual Studio Project"). Once the library has been referenced, the classes in the library can be instantiated and exercised.

How do I view C++ classes in class designer?

Visual C++ classes in Class Designer. Class Designer supports C++ classes and visualizes native C++ classes in the same way as Visual Basic and C# class shapes, except that C++ classes can have multiple inheritance relationships. You can expand the class shape to show more fields and methods in the class or collapse it to conserve space.

How do I create a solution for a class library project?

Start by creating a solution for your class library project and its related projects. A Visual Studio Solution just serves as a container for one or more projects. To create the solution: On the Visual Studio menu bar, choose File > New > Project. In the New Project dialog, expand the Other Project Types node, and select Visual Studio Solutions.

How do I call a function in a Visual Basic class library?

How do I call a function in a visual basic class library? For that example you don't have a method in a class library - you have a class in a class library, and the class has a method. You would execute the method by creating an instance of the class and calling the instance method:


1 Answers

We working in a small team and new member with no VSO experience has come onboard. He's working on the frontside AJAX, JSON, CSS, HTML5 - no need to use the classlibs or anything else - just submitting his code via TFS.

I suspected he might be an issue, so fixed up remote access and went in. He'd not updated Windows 7 since new - around 4 years. "Never had a BSOD" was the response. He was trying to install IIS which the machine wasn't very happy about it, so could not test locally, I don't know what the webserver in Visual Studio was doing - his system was not in English. Anyway I right-clicked where I would have done on the English version and did a recursive pull - then clicked on what looked like the Pending Changes and did a checkin.

Success - solution built OK.

I told my programmer to delete Visual Studio and never do a checkout again on that PC - and am providing him a remote desktop with fully patched machine and software.

like image 61
bendecko Avatar answered Oct 18 '22 18:10

bendecko