msvc-wine icon indicating copy to clipboard operation
msvc-wine copied to clipboard

Unable to build MASM targets

Open mochaaP opened this issue 11 months ago • 5 comments

Z:\opt\msvc\MSBuild\Microsoft\VC\v170\BuildCustomizations\masm.targets(70,5): error MSB4175: The task factory "XamlTaskFactory" could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKey
Token=b03f5f7f11d50a3a". Could not load the file 'Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. [Z:\tmp\sample.vcxproj]

This is because wine loads Microsoft.Build.Tasks.v4.0 from wine-mono, but mono does not implement XamlTaskFactory:

Image

mochaaP avatar May 05 '25 00:05 mochaaP

@mstorsjo pls address this issue

fxrstor avatar May 11 '25 06:05 fxrstor

@U65535F Meanwhile, you can use winetricks dotnet48 to install the non-Mono version, that should be sufficient to run your build.

mochaaP avatar May 12 '25 02:05 mochaaP

@mochaaP I don't understand, do I have to run that wiretricks dotnet48 command before starting out the msvc? Would that fix the issue of MASM targets?

fxrstor avatar May 12 '25 04:05 fxrstor

afaik it's likely not possible to run XamlTaskFactory on Mono for now - it uses runtime c# codegen (CodeDomProvider) which is quirky on Mono

mochaaP avatar May 25 '25 23:05 mochaaP

It should be possible if we are willing to replace the bundled masm.targets with our own one, using pre-generated TaskFactory dll

mochaaP avatar May 25 '25 23:05 mochaaP