Visual Studio Online cannot find a function in a class in the class library on the build server

Hi, I am getting an error in the VSO log and 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 classlibrary ..

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

This, of course, does not work locally without problems.

I tried to make a one-byte change and confirm again, the related DLL was also under source control, so I removed and added this. There is no joy.

UPDATE - no, the bad news is the answer I posted below temporarily resolved the issue. Once again he raised his ugly head and despite the fact that he could not make the assembly work.

So far, the following procedures have been undertaken to properly compile VSO online builds:

1) I deleted my local folders and performed a full check from sourcecontrol suggested by @MetaFight. This compiles normally locally, without files.

2) The folders / Bin and / Obj are excluded. This way the dll is not checked in the source as suggested by @PhilipKendall

3) Launch MSBuild locally. The solution is compiling.

4) Renamed and then moved the function inside classlib to try to invoke the rebuild on the Azure server. Still unable to find function.

5) Checked build order, Classlib is compiled first. The "Clear" option selected in the "Assembly Profile" section.

6). Check the links are correct. I see the link in the vbproj file. A link is a project link, not a file link.

7) Remote build profile in Azure / VSO. Created a new assembly warp profile and a new web application in Azure - an error occurs.

8) I tried this solution Library / Static method, not updated in Azure There is no merge error, like point 3) on this page.

Can any TFS / VSO experts help?

+6
source share
3 answers

Apologies for not returning earlier.

As discussed, the problem returned, even though it managed to build after being checked by a rogue programmer, he later returned to the non-building.

In the end, we renamed classlib (by right-clicking and renaming). Then we checked the links to this lib class from all other projects that require it. There was one subproject that on "add .. reference ..." did not have a flag, but in the project and link properties. Thus, this should have correctly restored the line in the vbproj file.

Congo we are building!

0
source

We work in a small team, and a new member with no VSO experience appeared on board. He works on frontside AJAX, JSON, CSS, HTML5 - no need to use classlib or anything else - just sends his code through TFS.

I suspected it might be a problem, so I set up remote access and logged in. He did not update Windows 7 with a new one - about 4 years. "There has never been a BSOD." He tried to install IIS, which the machine didn’t really like, so he couldn’t test it locally, I don’t know what the web server does in Visual Studio - its system was not in English. In any case, I right-clicked wherever I would do this in the English version and made a recursive click - then clicked on what looked like the pending changes and checked.

Success - The solution is built OK.

I asked my programmer to remove Visual Studio and never check on this computer - and I provide him with a remote desktop with a fully-fixed machine and software.

+1
source

You can do one of the following:

1) Have you checked "Enable Nuget Package Recovery" for your project?

You can use the following documentation for this:

http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages

Or:

2) Read the source below, this may help you if the first method is not applicable for you or does not help:

http://blog.codingoutloud.com/2013/08/31/are-you-missing-an-assembly-reference-why-yes-i-am-so-kind-of-you-to-ask/

I hope both suggested methods support your question.

0
source

Source: https://habr.com/ru/post/986733/


All Articles