TFS build unable to locate the project file and dlls - visual-studio

I am trying to run a newly created Build in TFS but i am getting an error that :
The project file "D:\Binaries\vsts-agent-win7-x64-2.105.7\_work\1\s\CompanyA.Solution\..\..\..\Users\ihalarnkar=\Documents\Visual Studio 2013\Projects\CompanyA.Project2\CompanyA.Project2\CompanyA.Project2.csproj" was not found.
Also some of the external dlls i am using for those i am getting no reference found. Like :
The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
Does it mean i should have all the dlls i have referenced in the solution to be also installed on the tfs server?
How about the solution? Every new project added should be available on the physical drive on the tfs server?
This is the 1st time i am configuring and using DevOps for a SharePoint Provider Hosted app.
Kindly help.

You have a problem with your solution references -- the project reference looks to be for the path ..\..\..\Users\ihalarnkar=\Documents\Visual Studio 2013\Projects\CompanyA.Project2\CompanyA.Project2\CompanyA.Project2.csproj.
You'll need to go through your project files and fix the references.

Related

Assemblies can't get resolved when getting them from NuGet

I have some annyoing problem which I can't figure out. I installed Visual Studio 2017 Community on a new laptop and loaded an project I made on my old one from TFS. Suddenly some of the references can't get resolved.
So I tried to create a complete fresh ASP.NET MVC Project and download some of the assemblies that don't work in the old project by NUGET. After downloading the references don't work. I get already the warning in VS. One of those assemblies that doesn't work is for example
The referenced component 'System.Linq.Expressions' could not be found.
NUGET downloaded the assembly correctly and added the reference to the project. If I open the project file I find the entry for System.Linq.Expressions
and in HintPath: ..\packages\System.Linq.Expressions.4.3.0\lib\net463.
That file definitely exists on the file system. I also tried to change to path to an absolute one manually with same result.
I am using the newest .NET framework 4.7.2
Any suggestions what might be the problem?

TPL Data flow giving .Net referenced assemblies in output

I am using Visual studio 2013. I added Microsoft.TPL.Dataflow 4.5.24 from Nuget Package Manager solution for project in VS. I also having Setup for this project.
When i rebuild the Setup Project All the .net referenced libraries(System.IO, System.Linq and etc.,) are also come in output directory. If i remove the TPL.dataflow then the problem wont exist.
I need to use this library for my project. Please Help me to remove Referenced libraries in the output of setup project

Visual Studio Solution DLL error

I have a visual studio solution which works fine on one machine and when I copy the complete same solution to another machine it misses few external dlls.
Both the machine have same configuration and same version of visual studio.
I tried removing reference and adding again.I am able to reference the dll and use code but when I re-build,It gives the same error.Any pointers on what could have gone wrong?
The error message I get is as below
The type or namespace name 'NameSpaceName" could not be found (are you missing a using directive or an assembly reference?)
Also the warning shows.
The primary reference "NameSpaceName" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
Both the machine have Visual Studio 2010 installed. It works on one and doesn't work on another machine
The reference you have added to the project is likely not in a subfolder of your project but referenced from the Global Assembly Cache (GAC). Since you probably didn't copy the GAC, this reference is now of a different version. Figure out which (3rd party ?) component is affected and install an older version of that component.
Typically, Visual Studio cannot target .NET 4.5, unless you applied a workaround. In that case, you can go to the project properties, Application and change Target Framework from 4.0 to 4.5.

Visual Studio Team Services Build Issues

I am using Visual Studio Team Services as source control and have enabled continuous integration.
My project is an ASP.NET application which used Entity Framework 5. When i checkin the code and the build controller tries to build it, the following errors come up
DataModel\GenomicsTutorDataModel.Context.cs (40): The type or
namespace name 'DbSet' could not be found (are you missing a using
directive or an assembly reference?)
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets
(1578): Could not resolve this reference. Could not locate the
assembly "EntityFramework". Check to make sure the assembly exists on
disk. If this reference is required by your code, you may get
compilation errors.
In my solution i have made system.data.entity CopyLocal = True yet no success.
Any ideas?
May be you are on a 64 bits machine and the TFS server is not?
Try to build your project for Any CPU or x86.
Add the DLL you referenced for System.Data.Entity into a folder in your project or somewhere in a folder in the Source Control and reference to that one. Check this in and try to build your application again.

TFS 2010 Microsoft.Office.Interop Reference Woes

I'm about to go crazy with this problem!
I created a new server on a virtual
machine for TFS.
I have created a new Build
Definition, that when a solution is
checked in from my local machine TFS
is to build my solution using the
default build process template.
On the TFS machine and my local
machine I have MS Office 2010 and
.Net framework 4.0 Installed.
In my project I have a reference to
Microsoft.Office.Interop, etc...
This all build fine on my local
machine.
The problem occurs when the build definition is triggered. The build is run and does it's stuff for a while until it gets to the Microsoft assembly references.
The type or namespace name 'Office'
does not exist in the namespace
'Microsoft' (are you missing an
assembly reference?)
The type or namespace name
'Application' could not be found
(are you missing a using directive
or an assembly reference?)
ETC
The references paths point to the GAC, in case that matters.
Help would be awesome, and you would therefore be awesome by extension.
Regards,
Byron Cobb.
Byron,
If you take the assemblies from the compiled version on your computer create a libs folder at your solution level, then add the dlls for
Microsoft.Office.Interop.Word.dll
Microsoft.Office.Interop.Excel.dll
Microsoft.Vbe.Interop.dll
OFFICE.DLL
Into the libs folder, then remove the reference to your Office Interop and add references to the following assembies in you libs folder, should work a treat, we build without office on our build server.
Regards
Iain

Resources