Getting error when trying to build ArcObjects project in VS 2015 - plugins

The install works correctly, you can create an Add-in project, but trying to build the project receives this error:
The "ValidateAddInXMLTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.Shell.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at ESRI.ArcGIS.AddIns.SDK.MSBuild.ValidateAddInXMLTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

You can find out Esri's solution for this error from bellow link which explains following points:
EsriSupport link
ArcGIS Desktop and Engine add-ins have a dependency on the Microsoft Visual Studio Shell 12.0 library.
This error occurs when using Visual Studio 2015 without this library.
Note:
If Visual Studio 2013 and 2015 are both installed on the machine, this problem does not occur. Visual Studio 2013 includes the Microsoft Visual Studio Shell 12.0 library.
The solution on Esri's support site says:
To resolve this issue, download and install the Microsoft Visual Studio 2013 Shell (Isolated) Redistributable Package.
However, this download is no longer available.
But, don't worry I have uploaded this file on the drive, below is the link to download:
My Drive

Related

On Visual Studio Test task v2 I am getting the error: The test source file "...UnitTestFramework.dll" provided was not found

On Azure DevOps I have a build pipeline with a Visual Studio Test task v2:
I have the VS.QualityTools.UnitTestFramework nuget package on my solution.
I am getting the following error:
"(...)"D:\a\1\s\packages\VS.QualityTools.UnitTestFramework.15.0.27323.2\lib\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll"
"D:\a\1\s\packages\VS.QualityTools.UnitTestFramework.15.0.27323.2\lib\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll"
/logger:"trx"
/TestAdapterPath:"D:\a\1\s"
/diag:"D:\a_temp\54d6e190-44ec-11e9-ade6-9902b6d394ce.txt"
The test source file "D:\a\1\s\packages\VS.QualityTools.UnitTestFramework.15.0.27323.2\lib\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll" provided was not found."
When I run my tests on Visual Studio on my local machine, it works fine. Do you have any guess why this error is happening?
Based on your build definition display, you are currently using VS Test task v2.
According to current MS Docs documentation, using this VS Test task v2 means that this version only supports VS 2015, 2017, and 2019 unit test projects. But I strongly suggest that you use this task only for VS 2017 and VS 2019 to create the test projects.
If you use VS 2017, ensure that you are using VS 2017 15.7.1 or later to create the test project and to have nuget related packages that is compatible with VS 2017 at least Microsoft UnitTestFramework version 15.7.1 or later. Because this version is the initial version that allows you to create unit test projects with PackageReference model, instead of legacy packages.config model.

How to get EF6 to work with DB2 in Visual Studio 2017

I've read numerous articles and posts here about getting Entity Framework to work with DB2 but all of them reference prior versions of Visual Studio. When I repeat the steps outlined (too many to remember at this point), I still do not have DB2 in the data providers list.
Has anyone gotten this to work in VS17 and, if so, can you walk me through what you did?
For registering IBM Database Add-Ins for Visual Studio 17, Visual Studio 2015 or earlier supported versions needs to be installed on the machine.
Steps:
Download and install IBM Data Server Driver Package
Download and install IBM Database Add-Ins for Visual Studio.
After successful installation of IBM Database Add-Ins, choose Start -> IBM Database Add-Ins for Visual Studio ->Register IBM Database Add-Ins.
This link has listed the steps needed for the add-in installation
https://www.ibm.com/developerworks/community/blogs/96960515-2ea1-4391-8170-b0515d08e4da/entry/VSAIFORVS2017?lang=en
Note: Make sure to download same version and fix pack of DS Driver and VS IBM Database Add-In. I downloaded v11.1.3fp3 version for both installations and it's working for me.

on-premises build agent is failing to build solution with projects on .net 4.7.1

We have recently upgraded some projects to .net framework 4.7.1 but our on premise build agent is failed to run the build solution build step. We are using Visual Studio Team Services.
The full error is...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (1122, 5)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1122,5): Error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
The build machine is a windows server 2016 azure VM with Visual Studio 2017, 15.4.4 installed. I manually installed the 4.7.1 .net framework sdk from here: https://learn.microsoft.com/en-us/dotnet/framework/whats-new/index#v471.
I've rebooted and restarted the agent service but still it failed with the above.
Any ideas how to resolve this issue?
The full build solution log file can be found here: Build solution log gist
Thanks,
It turned out the issue was due to not having the 4.7 SDK and 4.7 targeting pack checked under individual components in Visual Studio.

Visual Studio LightSwitch 2011 cannot deploy a Web Project via WebDeploy v2.0+

I am receiving the following error when attempting to publish a Visual Studio LightSwitch 2011 project ...
Error 1 The "VSMSDeploy" task failed unexpectedly.
System.ArgumentException: Version string portion was too short or too long.
at System.Version.VersionResult
.SetFailure(ParseFailureKind failure, String argument)
at System.Version.TryParseVersion(String version, VersionResult& result)
at System.Version.Parse(String input)
at System.Version..ctor(String version)
at Microsoft.Web.Publishing.Tasks.Common.Utility.CheckMSDeploymentVersion()
at Microsoft.Web.Publishing.Tasks.Common.Utility.get_IsMSDeployInstalled()
at Microsoft.Web.Publishing.Tasks.Common.Utility
.CheckMSDeploymentVersion(Task task)
at Microsoft.Web.Publishing.Tasks.VSMSDeploy.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd
.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(
ITaskExecutionHost taskExecutionHost,
TaskLoggingContext taskLoggingContext,
TaskHost taskHost, ItemBucket bucket,
TaskExecutionMode howToExecuteTask, Boolean& taskResult)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\
Microsoft.LightSwitch.targets 96410Application3
I have tried re-installing Web Deploy (both 2.0, via the website, and 2.1, via the WebPI) but no joy.
It turns out Visual Studio LightSwitch 2011 requires Web Deploy 1.1 which was not installed by its installer (2.0 had previously been installed by WebMatrix and I also tried 2.1 via the WebPI). My problem was solved after I downloaded it from the Microsoft Download Center:
Web Deployment Tool (x64)
Web Deployment Tool (x86)
This did make me wonder why LightSwitch doesn't support WebDeploy 2.0/2.1, and also installs SQL Server Express 2008 rather than 2008 R2, but that is a question for another time

How to install VC80CRT debug runtimes without full visual studio 2005?

I can't run a debug sdk application because it requires both VC 8 and VC 9 versions of the CRT. But it only requires visual studio 2008 for plugin dev, which is what I need.
How do I install the debug runtimes from 2005 on to a Windows7 machine? I can't figure out how to make them run app local nor can I copy anything into the winSxS folder without a trusted installer.
Refer to this post.
As per this the debug dlls can be found at:
For Visual Studio 2005:
C:\Program Files\Microsoft Visual
Studio 8\VC\redist\Debug_NonRedist\x86
For Visual Studio 2008:
C:\Program Files\Microsoft Visual
Studio
9.0\VC\redist\Debug_NonRedist\x86
Also as per what I know you need not have these dlls in the WinSxS folder. Even if these dlls are present in the same directory as your application exe is, it will do.
Anyways using debug dlls in production environment is not recommended.
In case you elevate your application, make sure you set the 'Start in' path to the application home/install directory or add the path to the VC++ debug dlls to the PATH environment variable.
You must install visual studio to get the debug CRT. This will be moot as soon as we don't need 2005 or 2008 again.
You can create a simple setup project (vdproj) which pulls in the debug merge modules.
This works fine up to Visual Studio 2010 (VS10) but is not supported for 2012 (VS11) and later :o(
You must install the C++ compilers to get the debug CRT, but you don't have to install all of Visual Studio. Instead, use the web install of the Windows SDK to install the compilers. The Windows 6 SDK includes the VC8 compilers, the Windows 7 SDK includes the VC9 compilers and the Windows 7.1 SDK includes the VC10 compilers.