This simple project:
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Build">
<Warning Text="$([MSBuild]::MakeRelative('/bar/baz', '/foo'))" />
</Target>
</Project>
Fails (on Linux/CoreCLR) with this error:
test.proj(3,12): error MSB4184: The expression "[MSBuild]::MakeRelative(/bar/baz, /foo)" cannot be evaluated. Invalid URI: The format of the URI could not be determined.
If the path is a valid Windows/DOS path, this error isn't thrown:
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Build">
<Warning Text="$([MSBuild]::MakeRelative('c:\bar\baz', '/foo'))" />
</Target>
</Project>
test.proj(3,3): warning : ../../foo
Thanks to @joperezr for the report.
This simple project:
Fails (on Linux/CoreCLR) with this error:
If the path is a valid Windows/DOS path, this error isn't thrown:
Thanks to @joperezr for the report.