Closed ccpu closed 5 years ago
@Cyrus-d - Did you find a solution to this? Running into this same error.
Duplicate of https://github.com/Microsoft/msbuild/issues/3726, which has some workarounds.
This issue was moved to Microsoft/msbuild#4009
@SimplerSoftware Unfortunately I couldn't find a proper solution for this, it works fine with visual studio and I am mostly using VS for my works, so it's not bothering me that much. sorry, couldn't be of much help.
Hi,
I am using 'RoslynCodeTaskFactory' for my task as suggested in here:
MSBuild inline tasks with RoslynCodeTaskFactory
Task Code:
it does work fine in the visual studio, however, when running 'dotnet build' it will throw the following errors:
error MSB3755: Could not find reference "mscorlib". If this reference is required by your code, you may get compilation errors.
error MSB3755: Could not find reference "netstandard". If this reference is required by your code, you may get compilation errors.
error MSB4175: The task factory "RoslynCodeTaskFactory" could not be loaded from the assembly "C:\Program Files\dotnet\sdk\2.2.100-preview3-009430\Microsoft.Build.Tasks.Core.dll". The task factory must return a value for the "TaskType" property.
Target: .NET Core v2.1
maybe related problem here: https://github.com/Microsoft/msbuild/issues/3726
Can you please tell what am I missing here.
Thanks