Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jnm2 opened this issue Oct 14, 2019 · 3 comments · Fixed by #59
Labels
bug Something isn't working

Comments

@jnm2
Copy link
Contributor

jnm2 commented Oct 14, 2019

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)'))" />

@sharwell sharwell added bug Something isn't working help wanted Extra attention is needed labels Oct 14, 2019
@jnm2 jnm2 changed the title Targets try to evaluate GetDirectoryName('') and cause "path is not of a legal form" error Targets try to evaluate GetDirectoryName('') and cause "path is not of a legal form" error (support netcoreapp3.0 and netstandard2.1) Nov 1, 2019
@JohanLarsson
Copy link

Other repros:
https://github.com/GuOrg/Gu.Wpf.NumericInput
https://github.com/GuOrg/Gu.Wpf.Adorners

Multitargeting WPF libraries.

@jnm2
Copy link
Contributor Author

jnm2 commented Dec 27, 2019

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

@jnm2
Copy link
Contributor Author

jnm2 commented Dec 29, 2019

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>

@sharwell sharwell removed the help wanted Extra attention is needed label Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants