0
votes

I have been using TFS 2013 for years. I have made no changes to the server. I recently added a project to my solution. (VS-2103 update five) As I updated the project I ran local builds with no problem. Tested the code in Dev and everything worked great. However, when I went to run a build in TFS I continue to receive a build failure. If I remove the project from the solution I can run a build in TFS with no problem. I have deleted / recreated the project, renamed it, recreated a build definition, rebooted both ends. It is getting hung up when I reference out to a DLL that is part of the solution. I pull out that reference and I can build via TFS no problem. Also note that the other 30 or so projects in the solution reference the same DLL and the same classes with no issue. Just this one project I added. But it builds locally???

This is for a very legacy app that runs in a datacenter on its own server. TFS runs on its own server. No cloud involved. I am pretty much a one man show nearly end-to-end. All of the source code is on my workstation. Changes are passed up to the TFS server where the final builds are created. I installed TFS year ago... It has ran great for years until...

Hoping someone can give me a clue...

Some information from the Build Failure and the Log... cannot find the DLL that is part of the solution.

Error Message - C:\Builds\1\MARCL Government Reporting\Development\src\DatabaseAccessMonitor\DBAccesMonitor_bll.vb (8): Type 'ESACR.GeneralMailer_bll' is not defined.

Warning - C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (1697): Could not resolve this reference. Could not locate the assembly "ESACR". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

Warning - C:\Builds\1\MARCL Government Reporting\Development\src\DatabaseAccessMonitor\DBAccesMonitor_bll.vb (5): Namespace or type specified in the Imports 'ESACR.DataSetFilter' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.

Part of the log where you can see it cannot seem to find the ESACR.dll...

3>PrepareForBuild: Creating directory "obj\Release". ResolveAssemblyReferences: Primary reference "ESACR". 3>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "ESACR". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\MARCL Government Reporting\Development\src\DatabaseAccessMonitor\DatabaseAccessMonitor.vbproj] For SearchPath "{HintPathFromItem}". Considered "..\ESACR\bin\Release\ESACR.dll", but it didn't exist. For SearchPath "{TargetFrameworkDirectory}". Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2\ESACR.winmd", but it didn't exist. Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2\ESACR.dll", but it didn't exist. Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2\ESACR.exe", but it didn't exist.

2

2 Answers

0
votes

Please try the following method to see if it can solve the problem:

  1. Open the project file (in your case should be .vbproj).
  2. Add the following object to the project.
<Target Name="BeforeResolveReferences">
  <CreateProperty Value="relative/or/absolute/path/to/the/references;$(AssemblySearchPaths)">
    <Output TaskParameter="Value" PropertyName="AssemblySearchPaths"/>
  </CreateProperty>
</Target>

Articles as reference:

0
votes

After many many long hours I found the problem. Here is the deal. I am running VS-2013 IDE and it is mated with TFS 2013 Update Five. No clouds... Yes, it is pretty old but large companies are not real interested in updating to the latest thing when it really does not do anything for the internal operation of the business. And, they keep me pretty busy too.

My VS Solution has many Projects that reference a common dll file. In the properties of nearly all of the individual Projects I have a reference made to this common dll file. And this works / builds flawlessly for all of the other Projects but the one I was having trouble with.

So, what was the deal with one project that would build locally with no problems but would not build via TFS. I finally took a look at the VS Solution project file and found that this individual Project did not actually have a reference to the common DLL even though it was specified in the Project properties.

Added the reference in an bang... it works.