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

Ensure Unity publishing works without disrupting other targets #152

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

reeseschultz
Copy link
Contributor

@reeseschultz reeseschultz commented Oct 2, 2023

This pull request fixes this problem: #143 (reply in thread).

The tests pass while simultaneously allowing Unity publishing with netstandard2.1.

Now the TargetFramework for projects that otherwise didn't have it is set to net7.0 (see below comment) which will prevent the tests from failing (for that reason). TargetFramework, TargetFrameworks and TargetFrameworkVersion are also now forced in the UnityPublish.sh script as arguments, because it 100% reliably overwrites whereas putting them in Directory.Build.targets apparently didn't. I'm not a fan of MSBuild.

I'm additionally ensuring that any previously published assemblies are deleted before new ones are generated again just to be safe. We don't want old ones to gunk up the directory. And I removed some confusing language about codegen from the shell script. Sorry for all the hassle with this. It's a lot of trial and error wrangling this build system to comply with reason.

Sister PR: genaray/Arch.Extended#25

@reeseschultz
Copy link
Contributor Author

reeseschultz commented Oct 2, 2023

Amending the above, I went full-circle and removed the TargetFramework property from Arch and every single multi-target project in Arch.Extended (it's back to how it was before the Unity publishing changes). This would have caused an error if I were still trying to overwrite it and related properties inside the Directory.Build.targets file itself, but since I'm now overwriting them as arguments to dotnet msbuild in the shell script, this is perfectly fine. The tests pass (for Arch), the Unity publishing works, and the CI passes as well.

Deep breath.

@genaray genaray merged commit a412ba9 into genaray:master Oct 3, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants