.csproj files within a local UPM can't find MSBuildForUnity.Common.props
I'm attempting to follow Scenario 4: Distribute a UPM Package w/ NuGet Dependency. Based on my understanding of the documentation, I have:
- Added a '.csproj' file to my UPM that announces the NuGet dependencies that my UPM needs.
- Made
com.microsoft.msbuildforunitya dependency of the UPM
When adding the UPM to an existing Unity project the com.microsoft.msbuildforunity integration kicks in, and I see the command-line invoked:
[package location]\Runtime> C:\Program Files\dotnet\dotnet.exe msbuild [packagename].csproj -restore -v:minimal -p:NuGetInteractive=true -t:Build -p:Configuration=Release
But since the [package location] - for local packages - is outside the scope of the Unity project, then the line:
<Import Project="$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))')" />
is a no-op, since the condition evaluates to false. There doesn't appear to be a way - given the command-line invoked - to identify the Unity project folder.
Proposal
Have the com.microsoft.msbuildforunity Unity scripts pass the Application.dataPath into the dotnet msbuild invocation as an MSBuild property would make the import a lot more clear.