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

Fix Platform and TargetFramework switching #70

Merged
merged 5 commits into from
Nov 27, 2019

Conversation

andreiborodin
Copy link
Contributor

This change improves how the project handles platform and target framework (API Compatibility set) changes. Furthermore, it makes sure to appropriately clean-up before making the switch.

This increments the version to 0.8.2 for the hotfix.

This PR is against the prerelease/0.8.2 branch which is essentially the release/0.8.1. Once we approve, I will rename prerelease/0.8.2 to release/0.8.2 and push a release.

@andreiborodin andreiborodin added bug Something isn't working HotFix labels Nov 27, 2019
@andreiborodin andreiborodin self-assigned this Nov 27, 2019
@david-c-kline
Copy link

looks reasonable to me

Copy link
Member

@ryantrem ryantrem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock other work, but we really should try to understand this better. I'm concerned that some of the project customizations are breaking clean, and if that is the case, then other issues could also be lurking.

@@ -12,4 +12,8 @@
<UnityMajorVersion><!--UNITY_MAJOR_VERSION_TOKEN--></UnityMajorVersion>
<UnityMinorVersion><!--UNITY_MINOR_VERSION_TOKEN--></UnityMinorVersion>
</PropertyGroup>

<Target Name="_RemoveOutputDirectory" AfterTargets="Clean">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still unclear why this is needed. If I create a default SDK style project and add a package reference to MSBuildForUnity and Newtonsoft.Json, it behaves like I would expect: build results in the project dll plus the Newtonsoft dll in the output directory, and clean removes all files from the output directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not what I am seeing, and there are GitHub issues detailing similar problems:
dotnet/msbuild#2408

Unless I am misunderstanding something, would be great to see an example to understand what I am doing wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the issue, and don't know how to fix it. Basically if the OutputPath of the project is under the directory that the project is contained in, then Clean works as expected; otherwise Clean doesn't remove the NuGet package output.

Opened #71.

@andreiborodin andreiborodin merged commit d1e3a15 into prerelease/0.8.2 Nov 27, 2019
@andreiborodin andreiborodin deleted the hotfix/0.8.2 branch November 27, 2019 19:22
andreiborodin pushed a commit that referenced this pull request Nov 27, 2019
* Rework automatic generation logic, and ensure cleanning of build artifacts is done at appropriate times.

* Removing debug logs.

* A few minor fixes to strengthen regen for correct times.

* Updated versions to 0.8.2

* Forcing NuGet packages to be copied out to bin folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HotFix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants