2
votes

I'm running Windows 10 64-bit and Visual Studio 2017 Community Edition.

I'm trying to compile a C# ASP.NET web sample project from a company. I am unable to get the project to compile because of this error. I've re-added Microsoft.Build.CppTasks.Common to the GAC, but that didn't help. I've also uninstalled and reinstalled Visual Studio 2017 and downgraded to Visual Studio 2015 to no avail.

Any help would be greatly appreciated. Here is the full error message:

The "XSD" task could not be loaded from the assembly Microsoft.Build.CppTasks.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.Build.CppTasks.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

1
Curious if you've made any progress... I have a similar problem, except that mine involves the Clean and SetEnv tasks. Fusion logs show that Microsoft.Build.CppTasks.Common is looking specifically in its own directory for the Microsoft.Build.Utilities.Core assembly, but it's not there. I've reported it at developercommunity.visualstudio.com/content/problem/197469/…Hugh

1 Answers

0
votes

If you're compiling from command-line MSBuild rather than Visual Studio, it may be that you need to start using the MSBuild that ships with VS2017 rather than the MSBuild from the .NET Framework. That was my problem... see this answer for context.