Unable to Build WPF Application

I am trying to build a WPF application and keep getting the following error:

[MSB4062] The "TransformXml" task could not be loaded from the assembly C:\Program Files (x86)\JetBrains\JetBrains Rider 2022.2.3\tools\MSBuild\Microsoft\VisualStudio\v17.0\Web\Microsoft.Web.Publishing.Tasks.dll. Could not load file or assembly 'file:///C:\Program Files (x86)\JetBrains\JetBrains Rider 2022.2.3\tools\MSBuild\Microsoft\VisualStudio\v17.0\Web\Microsoft.Web.Publishing.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> 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.

This appears to be a very odd error as it seems to have something to do with web publishing (Microsoft.Web.Publishing.Tasks.dll).

How can I resolve this error?
Thanks

0
4 comments

Hello,

What MSBuild instance do you have selected in Preferences | Build, Execution, Deployment | Toolset and Build? Have you tried selecting the MSBuild supplied with Visual Studio?

0

I don't have Visual Studio installed. But I have tried using the version of msbuild at "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" and that let to some odd errors e.g.  

SomeElementExtension.cs(12, 62): [CS1519] Invalid token '=' in class, struct, or interface member declaration

An error suggesting that the assignment operator is an invalid token.

0

I probably also should have pointed out that the app is using the old .NET Framework, with:

<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>

 Does Rider support WPF development with that?

0

Hello,

Regrettably, Rider does not supply the files that are pertinent to the TransformXml task. Please install Visual Studio and Microsoft Build Tools and in Rider settings select the MSBuild that is supplied with VS.

0

Please sign in to leave a comment.