Repro:
<Project>
<Target Name="Build">
<XmlPoke />
</Target>
</Project>
dotnet msbuild /t:Build
Error
poke.proj(3,7): error MSB4062: The "Microsoft.Build.Tasks.XmlPoke" task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the
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.
Expected
Same behavior as MSBuild.exe (full framework)
Details
dotnet.exe version: 1.0.0-rc4-004842
MSBuild version: 15.1.548.43366
cc @rainersigwald @jeffkl
They are currently not compiled in: https://github.com/Microsoft/msbuild/blob/xplat/src/Tasks/Microsoft.Build.Tasks.csproj#L699
I wasn't around when the conversion was done so I'm not sure why they were left out. I'm assuming they use APIs that aren't available in .NETStandard1.x
We should bring them back though. We can count this as a vote for pushing this one earlier in the list.
Could have been missing APIs, could have been "not used in our selfhost or the corefx repo and thus we never noticed it wasn't there". We should make sure anything missing in vNext is missing for a good reason.
I took a quick look. The API is available in .NET Standard 1.3, but you would probably have to add references to the System.Xml.XPath and System.Xml.XPath.XmlDocument packages.
We already reference System.Xml.XmlDocument which depends on System.Xml.XPath and System.Xml.XPath.XmlDocument. So having them compiled in just worked. I've submitted a PR to see how it does on non-Windows...
I was wrong about the dependencies but I did get it building with XmlPeek and XmlPoke. I've updated the PR...
Most helpful comment
We should bring them back though. We can count this as a vote for pushing this one earlier in the list.
Could have been missing APIs, could have been "not used in our selfhost or the corefx repo and thus we never noticed it wasn't there". We should make sure anything missing in vNext is missing for a good reason.