tunnelvisionlabs/ReferenceAssemblyAnnotator

Targets try to evaluate GetDirectoryName('') and cause "path is not of a legal form" error (support netcoreapp3.0 and netstandard2.1)

Closed this issue · 3 comments

jnm2 commented

C:\Users\appveyor.nuget\packages\tunnelvisionlabs.referenceassemblyannotator\1.0.0-alpha.77\build\TunnelVisionLabs.ReferenceAssemblyAnnotator.targets(129,47): error MSB4184: The expression "[System.IO.Path]::GetDirectoryName('')" cannot be evaluated. The path is not of a legal form.

Project: https://github.com/GuOrg/Gu.Wpf.DataGrid2D/blob/6797e4e33810663afb9d41be8a7dfd0bca77c063/Gu.Wpf.DataGrid2D/Gu.Wpf.DataGrid2D.csproj

Line in question:

<_NetStandardNuGetPackageFoldersNoSlash Include="$([System.IO.Path]::GetDirectoryName('%(_NetStandardReferences.Identity)'))" />

jnm2 commented

The cause is including netcoreapp3.0 or netstandard2.1 in the project's target frameworks.

jnm2 commented

Everyone watching this issue: please try version [1.0.0-alpha.108.gaa6f8a1044] (PR #59) and tell us whether or not it fixes the problem.

nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="appveyor-referenceassemblyannotator" value="https://ci.appveyor.com/nuget/referenceassemblyannotator" />
  </packageSources>
</configuration>