jeffkl / RoslynCodeTaskFactory

An MSBuild CodeTaskFactory that uses Roslyn compiler for cross platform compatibility
MIT License
26 stars 3 forks source link

Document if CodeTaskFactory is deprecated #41

Closed malkia closed 4 years ago

malkia commented 4 years ago

Today, one of our teams experienced issues with CodeTaskFactory. Replacing it with RoslynCodeTaskFactory fixed the issue, but it was rather unexpected - no other code change was done, and the only other visible change was the Windows Update.

So I'm getting conflicting information whether CodeTaskFactory is deprecated, or not. Also not very straightforward answers.

We are not first-class users of it, but simply by reusing another .targets/.props file from the Qt Projec t (QtMsBuild) it actually used CodeTaskFactory and that's how it broke us.

Ref: https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-roslyncodetaskfactory?view=vs-2019

And here is the message that we had today:

6>------ Build started: Project: SomeProject, Configuration: Release x64 ------
6>...\sdk\qt\qtmsbuild\qt.targets(705,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Build.Tasks.Core.dll". A required privilege is not held by the client

According to some, this might've caused the change: "KB4534132 Cumulative Update for .NET Framework 3.5 and 4.8 for Windows 10 Version 1903"

jeffkl commented 4 years ago

Kamino closed and cloned this issue to microsoft/msbuild