Where to find microsoft.mshtml.dll on docker image - windows

In my build server docker image based on mcr.microsoft.com/windows/servercore:1809-amd64, I get a missing reference error to microsoft.mshtml.dll while running the build. The dll is related to the internet explorer which is clearly not installed on that image. I have dotnet framework 4.7.2 SDK and TargetingPack installed on the image, which do not seem to include the file. Is there a SDK or a workload of the visual studio build tools which contains this dll? Is there a way figure out which workload/sdk contains which files?

Among the workloads and components that can be installed with Visual Studio Build Tools as listed here, the dll is contained in Microsoft.VisualStudio.Component.TeamOffice.BuildTools.

Related

Visual Studio: Cannot build an executable or dll when there is space in the path to the build tools

I have been using VS to create a DLL but when I tried to build it VS broke the path to the build tools location down to multiple pieces. I already have VS BuildTools installed on my machine. Do you guys know how to solve this ? Here are some screenshots:
I have been looking on the internet for 2 days now but I couldn't find one that work for me. I have tried some methods but it doesn't work.

.NET Core 2 Console App Dependencies Issue on Azure

Short version of the problem:
I'm having difficulties including the assemblies my .NET Core Console App depends on.
Initially, the assemblies from NuGet packages were not included in the bin folder even though I could run the app in Debug mode without any problems.
Found an article that suggested that I should add <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> in the myapp.csproj file which I did.
Doing so included the dll files for the NuGet packages in the bin folder BUT after I copied my console app to Azure to run as a WebJob, I got an error telling me that System.Data.SqlClient was missing.
After inspecting the folder where the WebJob runs, I could see that the dll for System.Data.SqlClient is actually in the folder. I concluded that it may have been an issue with version numbers. The error indicated the following:
'System.Data.SqlClient', version: '4.4.2' was not found
When I right click the dll file for this assembly and check its version, it shows version 4.6.
Any idea how to resolve this issue?
Longer Version:
I built this .NET Core 2.0 console app to run as a WebJob following this article: http://matt-roberts.me/azure-webjobs-in-net-core-2-with-di-and-configuration/
I had to create this WebJobs app manually because currently Visual Studio does not provide a way to build Azure WebJobs in .NET Core.
Because of this current limitation, I also could not Publish my WebJobs app directly from Visual Studio.
So, I tried to zip it up and upload it through Azure Portal. This is when I realized that NuGet assemblies were not included in the bin folder. The rest of the story is already up in the "Short Version" section.
I'd appreciate some suggestion in solving this issue.
UPDATE:
When I ran dotnet publish --self-contained -r win32-x64 -c Release inside the project's root folder, I got the following error:
Not quite sure of the WebJobs specification, but you should be able to use dotnet publish --self-contained -r win-x64 -c Release to generate executable and its dependencies. Zip them up and you should be able to deploy to Azure.
There is really no need to modify your csproj like you did.
Besides, you can use .NET IL Linker to shrink the size of the generated folder.
Reference
https://learn.microsoft.com/en-us/dotnet/core/deploying/deploy-with-cli#self-contained-deployment-with-third-party-dependencies

Is Visual Studio Required to run Coded UI tests on a build server?

I have references to
using Microsoft.VisualStudio.TestTools.UITest.Extension;
using Microsoft.VisualStudio.TestTools.UITesting;
But I'm building on a server without Visual Studio installed.
My builds are failing because these dlls can't be found (their path is in the VS install directory on my local machine)
Does this mean VS is required to run these on the build server? Or can I just copy the dlls into some project folder and add them as references?
The recommended approach is to install VS on the build server and the licensing is such that you are able to do that. The team know that this is not an ideal solution but it's the only one we have today. Note that the build server images provided by Microsoft in the hosted environment (tfs.visualstudio.com) have VS2012 and VS2010 installed into them for exactly this type of reason.

How to deploy a standalone project that is based on OpenCV in Visual Studio 2010?

I have a solution in VS 2010 that calls several OpenCV functions. Now I want to deploy (release) this project to use in another machine that doesn't have OpenCV. I don't want to install OpenCV on the other machine.
I know that I need several dll files, is there any automatic method that can collect all the desired files and put them together with the released .exe file so I can just send/copy this folder ?
Many thanks,
If you have the solution in VS2010 you can look at the project Properties and check which OpenCV libraries the project is being linked with, and then ship those DLLs along with your application. It's a 2 min work.

TFS 2010 Build - Do I need to install Visual Studio 2010 on TFS 2010 Build Server

I have the following error on the build server for code that compiles and passes tests fine locally.
(150): The imported project
"C:\Program
Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"
was not found. Confirm that the path
in the declaration is
correct, and that the file exists on
disk.
I've added the WebApplications folder from my local machine to the appropriate path on the build server but I'm still getting the same error on build.
I believe the recommended approach with TFS2008 was to install VS2008 in it's entirety on the build server. Is this still the case with TFS2010 and VS2010 accordingly? a.k.a Sledgehammer to crack a nut.
Pretty much, especially if you plan on using other features like MSTest. You can try just adding the targets file but you'll probably still have some missing dependencies. You could go through the whole process of fixing the dependencies as you go along but it's probably easier just to install VS 2010 and be done with it.
This blog post seems to describe a way to do what you want without having to install additional software on the build server, if all you need is the .net compilers. It does not cover C++ compiler setup.
I discovered that if you're going to do just "standard" (i realize that's open to interpretation) web apps and non-web apps (e.g. services), you can get away with installing just Visual Studio 2010 Shell, plus Visual Studio 2010 SP1 on the build server. That will get you the missing .targets files.
Since a full VS install is required for advanced features, does anyone know if the build-server-install license cost is waived?

Resources