I have msbuild version 14.0.25420.1 on my win10 command prompt computer, If I try to build a visual studio project file with this command:
msbuild .\folder1\WxsGenerators.sln
I get an error
BUILD FAILED
D:\Dev\Views\YY261307_main_sv\microsoft\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.targets(40,5): error MSB4062: The "SetEnv" task could not be loaded from the assembly Microso
ft.Build.CppTasks.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxx. Could not load file or assembly 'Microsoft.Build.CppTasks.Common, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=xxx' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, th
at the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [D:\path\TomtecWxs.vcxproj]
On my machine I have visual studio 2015 and visual studio 2019 installed. I need to figure out how to fix this error and build the .sln file, I've found a similar error posted here:
Error MSB4062: The "SetEnv" task could not be loaded from the assembly
In the accepted answer, I tried to run the npm commands but was unable to do so, the other solution create .config file in the same dir as your exe (if you don't have it already) containing binding redirection of msbuild assemblies
I am not sure how to do
Is there any way I can understand better / fix this "SetEnv" task could not be loaded from the assembly Microso ft.Build.CppTasks.Common
error? Thanks