Title: .csproj files within a local UPM can't find MSBuildForUnity.Common.props · Issue #144 · microsoft/MSBuildForUnity · GitHub
Open Graph Title: .csproj files within a local UPM can't find MSBuildForUnity.Common.props · Issue #144 · microsoft/MSBuildForUnity
X Title: .csproj files within a local UPM can't find MSBuildForUnity.Common.props · Issue #144 · microsoft/MSBuildForUnity
Description: 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...
Open Graph Description: 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 ...
X Description: 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 announce...
Opengraph URL: https://github.com/microsoft/MSBuildForUnity/issues/144
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":".csproj files within a local UPM can't find MSBuildForUnity.Common.props","articleBody":"I'm attempting to follow [Scenario 4: Distribute a UPM Package w/ NuGet Dependency](https://github.com/microsoft/MSBuildForUnity/blob/master/Documentation/CoreScenarios.md#scenario-4-distribute-a-upm-package-w-nuget-dependency). Based on my understanding of the documentation, I have:\r\n1. Added a '.csproj' file to my UPM that announces the NuGet dependencies that my UPM needs.\r\n2. Made `com.microsoft.msbuildforunity` a dependency of the UPM\r\n\r\nWhen adding the UPM to an existing Unity project the com.microsoft.msbuildforunity integration kicks in, and I see the command-line invoked:\r\n\r\n```\r\n[package location]\\Runtime\u003e C:\\Program Files\\dotnet\\dotnet.exe msbuild [packagename].csproj -restore -v:minimal -p:NuGetInteractive=true -t:Build -p:Configuration=Release\r\n```\r\n\r\nBut since the [package location] - for local packages - is outside the scope of the Unity project, then the line:\r\n\r\n```\r\n\u003cImport Project=\"$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))\" Condition=\"Exists('$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))')\" /\u003e\r\n```\r\n\r\nis 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.\r\n\r\nProposal\r\n----------\r\nHave the `com.microsoft.msbuildforunity` Unity scripts pass the [Application.dataPath](https://docs.unity3d.com/ScriptReference/Application-dataPath.html?_ga=2.105886275.197002183.1602003145-1167911491.1596144871) into the `dotnet msbuild` invocation as an MSBuild property would make the import a lot more clear.\r\n\r\n","author":{"url":"https://github.com/mschofie","@type":"Person","name":"mschofie"},"datePublished":"2020-10-06T22:34:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/144/MSBuildForUnity/issues/144"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d78d3239-0208-7e7c-669e-f04ba1276757 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC7A:2F0844:2514FD7:336DE84:697CAF69 |
| html-safe-nonce | 3417d424056e8ae8f085666b07a330213794cdf0ba5beaffc6e7acd42e4727ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzdBOjJGMDg0NDoyNTE0RkQ3OjMzNkRFODQ6Njk3Q0FGNjkiLCJ2aXNpdG9yX2lkIjoiODM5MTEyMzA0MDEyOTAzNjEzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b5ce92352c82e544570a39f2f8c4c7278e84ab43914c0b15e44b7ccd8ecc0560 |
| hovercard-subject-tag | issue:716065971 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/MSBuildForUnity/144/issue_layout |
| twitter:image | https://opengraph.githubassets.com/66217b897c6e132bf52fcad2c4c8b587344de1d44711b7bbaf40eabac5644aae/microsoft/MSBuildForUnity/issues/144 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/66217b897c6e132bf52fcad2c4c8b587344de1d44711b7bbaf40eabac5644aae/microsoft/MSBuildForUnity/issues/144 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mschofie |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5bdfd06d077d4bc79a8063f7549f208cda3158f1322903029653dc97f57b937a |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/MSBuildForUnity git https://github.com/microsoft/MSBuildForUnity.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 199713509 |
| octolytics-dimension-repository_nwo | microsoft/MSBuildForUnity |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 199713509 |
| octolytics-dimension-repository_network_root_nwo | microsoft/MSBuildForUnity |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f8a309d88087f59ff1a2f2cd9e9e79ed01a7b84e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width