TFS build throwing error of missing reference of GAC assembly - asp.net

I have created build script for my project. Project refer to the dotnetCHARTING DLL from GAC.
After initiating the Build on TFS am getting error's related to dotnetCHARTING.
Is there any way I can configure the GAC DLL reference in build script?
Thanks,
Chetan

Related

Copy Visual Studio Project - Compilation Error

I have an ASP.Net MVC 5 project inside a Visual Studio 2015 solution. I needed an exact copy of the project so in the File Explorer I copied the project and pasted to create a new project.
I renamed the copied project so that both projects now have a different name. I also updated the Namespaces inside of any classes in the copied project to reflect the new project name.
MyProjects.ProjectOne
MyProjects.ProjectTwo
I also deleted the Bin directory in the newly copied project. Both projects are targeted at the .Net Framework 4.0. I've restarted Visual Studio, but I still get the following compilation error when I now try to run either Project:
Compiler Error Message: CS0234: The type or namespace name 'ProjectOne' does not exist in the namespace 'MyProjects' (are you missing an assembly reference?)
I'm running out of ideas with regards to solving this.
Any advice would be greatly appreciated.
Thanks.
Make sure that the project which you copied has the correct references, and that the versions of the assemblies are the same as on the old project. You can also use the Object Browser to inspect an assembly and verify whether it contains the types that you expect it to contain.
For more information, see Troubleshooting .NET Framework Targeting Errors.

Project builds and deploys sucessfully - But unable to start

I can successfully build my BizTalk project and deploy it on my local machine.
However, when I start the application in the BizTalk Admin Console it complains that it:
Could not load file or assembly 'XXXXX, Version=X.X.X.X, Culture=neutral, PublicKeyToken=xxxxxxxxxxx' or one of its dependencies. The system cannot find the file specified. (Microsoft.BizTalk.ExplorerOM)
If it builds successfully how can it be complaining about a dll it cant find?
Any thoughts are much appreciated.
Thanks
The dlls need be signed and added to GAC.
My guess is some dlls your application depends is not added to GAC.

msdeploy: deploy reference of reference

is there a way for msdeploy to figure out reference of reference?
for example, i have project B that references project A that references TFS assemblies.
On my dev machine, TFS assemblies are GACed with Visual Studio installation, but my server doesn't have VS installed so it isn't GACed.
msdeploy doesn't seem to understand that it has to copy both assembly A and TFS assemblies that assembly A references.
I believe it is by design that VS ignores 'CopyLocal' if the assembly is GACed and i know that i can work around it by adding the assembly directly into the project but i am looking for more automatic way.
You should use the TFS API Nuget package to reference these assemblies instead of the GAC.
Microsoft.TeamFoundationServer.ExtendedClient

How to install ASP.NET MVC 5 on a server?

I just updated my website from MVC 4 to MVC 5.
Now when I want to run it on my web server instead of my development machine it does not work.
It think it is because I need to install the MVC 5 libraries on the server but I can't find them.
I downloaded WebMatrix 3 hoping it would provide a way to install it but it only gives me the ability to install MVC 4.
What should I install to be able to run a ASP.NET MVC 5 application?
(without installing Visual Studio 2013)
EDIT:
I disabled custom errors and eror what I have:
Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
EDIT 2:
I found out that the problem was due to one of my dependencies which was using the version 2.0.0.0 of razor.
When you deploy your app just make sure that all the assemblies are being deployed to your production environment in the bin folder. ASP.NET MVC is an xCopy deployment, so you don't have to install anything.
You might want to check that your Production environment has ASP.NET 4.0 and 4.5 registered.
MVC5 and future version of MVC doesn't require to installed on Windows Server. MVC5 app have everything as packages. You didn't need anything to install it.
What is required on server is copy of every library and assembly that you have used in your app. For fix this, Just make sure that everything on your bin folder is called same on server instead of server is looking for it's own GAC for assembly used in your app.
If you didn't found all the packages then you can install nuget packages on server by cmd.
The best is to do a Publish, right click on your project in Solution Explorer and select 'Publish'. Basically it will compile your solution and dump all the assemblies/artifacts to either your webserver, ftp or a local folder.
Make sure all your assembly references are being copied to the deployment directory. To do this you can change the <Reference...> tag in your .project file. Optionally, you can use visual studio's property setter to set the "Copy Local" property of each dll reference to "True".

Why isn't my project reference being picked up by the web deployment packaging in Visual Studio?

I have a Visual Studio 2010 solution with two projects:
An ASP.NET MVC 3 web application.
A class library.
The MVC application has a project reference to the class library.
When I use the "Build Deployment Package" option in Visual Studio to build the zip file with my web application for deployment, it does not include the class library. Thus, after deploying, I get an exception due to the missing assembly.
I have verified that the project reference is set to "Copy Local = true." When you build and debug the site, things work fine and the class library is in the bin folder. It's only when you build the deployment package that it goes missing.
If I switch from a project reference to a direct assembly reference, pointing to the bin/Debug/ClassLibrary.dll file, the package properly builds and includes the class library. I only see the issue when it's a project reference.
How can I get the class library as a project reference to be properly included in the web application package?
I'm not sure how to fix this if you're doing the deploy from VS.NET, but I did figure out how to do it from a MSBuild script.
The basic syntax to create an MSDeploy/WebDeploy .zip package for a .csproj in MSBuild is like this:
<MSBuild Projects="Path\To\Project.csproj"
Targets="ResolveReferences;Package"
Properties="Configuration=Release;DeployOnBuild=true;DeployTarget=Package;PackageLocation=Path\To\Output.zip" />
Note the Targets="ResolveReferences;Package". I started with Targets="Package", but that only half works.
Apparently, if you want to get the assemblies created from project references, you need to call ResolveReferences first. Just building the package won't do that, and you'll be missing any assemblies that are included in the project output as the result of project references.
Is it something silly like only having client profile on the class library?

Resources