MSBuildForUnity icon indicating copy to clipboard operation
MSBuildForUnity copied to clipboard

Feedback around setting up MSBuildForUnity in your own project

Open chrisfromwork opened this issue 6 years ago • 5 comments

Do I need to add MSBuildForUnity as a submodule? Where do I find com.microsoft.msbuildforunity?

chrisfromwork avatar Dec 06 '19 21:12 chrisfromwork

adding the scope registries stub above dependencies in manifest.json did not seem to result in the msbuildforunity package appearing in the unity package manager or the msbuild dropdown in the unity toolbar

chrisfromwork avatar Dec 06 '19 21:12 chrisfromwork

file referencing the package in a submodule location seems to work.

Turning on auto generation seems to generate an error if you don't run Regenerate C# SDK Projects

DirectoryNotFoundException: Could not find a part of the path "E:\chrisfromwork\MixedReality-SpectatorView-2\src\SpectatorView.Unity\MSBuild\settings.json".

chrisfromwork avatar Dec 06 '19 21:12 chrisfromwork

Great feedback, thanks for looking in, questions:

andreiborodin avatar Dec 09 '19 17:12 andreiborodin

I started with quick start. Other comments:

  1. It would be nice to show the entire manifest.json file in the "Quick Start" the stubs provided may be enough information for folks that know what they are doing, but if you have never opened a manifest.json file, you may not fully understand where to place the text stubs provided. Showing the whole file with the added lines bolded or an abreviation of the file where folks have some sort of reference point for where they are placing the content could help.

~~2. Documentation should call out that all code created for consumption should be placed in an asmdef. Trying to reference an Assembly-CSharp project from another Assembly-CSharp project generates issues.~~ Moved to #123.

  1. When on asmdefs exist, its unclear whether to declare external dependencies in Assembly-CSharp vs the Dependencies project. We should pick a best practice compared to trying to support a wide variety of permutations. It was also unclear how to rebuild these/what building was required to get dlls generated in your local project.

~~4. It seemed that project references needed to be duplicated in both the asmdef you care about's project as well as the Dependencies project when making references to other unity projects.~~ Moved to #123

chrisfromwork avatar Dec 11 '19 18:12 chrisfromwork

2 and 4 only applies to cross-unity project dependencies.

andreiborodin avatar Jan 31 '20 00:01 andreiborodin