TFS 2010 Microsoft.Office.Interop Reference Woes - visual-studio-2010

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

Related

TFS build unable to locate the project file and dlls

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.

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 Nuget dll not found in Release mode

I have a multi-project solution. In fact, some projects happen to be shared by 2 different solutions.
Anyhow, one of these is a test project and uses RhinoMocks. I used NUGET to add this to the project, and the solution is set to enable the download any packages from NUGET.
It builds just fine when in DEBUG mode, but when I put it into RELEASE mode, I get:
Error 1 The type or namespace name 'Rhino' could not be found (are you missing a using directive or an assembly reference?)
I don't think it's limited to RhinoMock, I've occassionally got it with NUNIT too.
Any ideas here?
Thanks

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.

Missing assembly reference Visual Studio 2012

I installed Visual Studio 2012 Ultimate and I encounter painful build problems. Solutions cannot build, because of
Error 12 The type or namespace name 'TypeName' does not exist in the namespace 'Framework' (are you missing an assembly reference?)
The assembly is there for sure and is referenced - the only change was new VS - previously I used VS 2010 Ultimate. Also the target framework of both assembly and solution is the same (4.0.3).
Any solutions?
Thank you in advance!
Make sure you have this line included:
using System.Web.UI.WebControls;
If that doesn't help, this link might: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.typename.aspx
The dll project and its referencing windows/console project should be in two independent folders.If these folders overlap the above problem comes.That means one project folder should not be inside other project folder.This problem coming only in vs2012 and vs2013

Resources