-
Notifications
You must be signed in to change notification settings - Fork 43
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 non-existing language targets restore #186
Fix non-existing language targets restore #186
Conversation
@@ -1,54 +1,97 @@ | |||
trigger: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful with the file encoding. There's an issue where UTF8 with BOM isn't being correctly handled. This file needs to be either ANSI or UTF8 without a BOM. The build error looks like it's tripping up over this.
Yes I just noticed that in your commits, that’s quite the gotcha 🙂 thanks!
|
6705a4b
to
bf92940
Compare
@onovotny I'm a bit puzzled by the modification I had to make in order for the tests to pass. Do you remember why it would be needed to conditionally include the original language targets ? It's all in |
@jeromelaban That import in CheckMissing is intended to only do the import of the default in case the target doesn't exist. Otherwise, the SDK imports it here: https://github.com/dotnet/sdk/blob/master/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.targets#L37 Those sdk targets are called here https://github.com/onovotny/MSBuildSdkExtras/blob/f1476ba441d9eacf4152ea04e5cc2e05b97ea6f8/Source/MSBuild.Sdk.Extras/Sdk/Sdk.targets#L15 That said, CheckMissing is called after that point given that it goes: SDK.target import -> LanguageTargets (like Windows.targets) -> CheckMissing. However -- and this is big -- in MSBuild 16, because of |
6c3b090
to
b3863a3
Compare
Fixes an issue where the platform targets are not available (building a netstandard 2.0 project that references a "netstandard2.0;xamarinios10" project on Linux.
1752563
to
f907e76
Compare
I see. This is why I'm seeing double imports warnings in the tests. I'll see if I can find a way to detect that, maybe I'll be lucky :) |
@onovotny It seems that we can rely on |
@jeromelaban Nice, not sure how I missed that as I was trying to find something like that! |
94d5c36
to
2927463
Compare
2927463
to
3273038
Compare
Thanks for tracking this down and setting up those tests! I'll get this pushed to NuGet once the master build completes. |
My pleasure :) We'll be able to add actual 16.3 tests soon. |
16.3 is on the agent now if that helps. |
I did not notice! That was fast. Then it'll be the turn for macOS and Linux agents. |
Not sure when that will be for those. There was an urgent need for 16.3 given the hard error with .NET Core 3. |
This PR fixes the scenario where building a head project should only build the proper dependency chain and ignore unknown targets (e.g.
xamarinios10
on linux).The current behavior is the following:
This PR also adds validations on Linux and macOS.
For the Linux tests, the MSBuild version installed version in the azure devops hosted agents is not working properly (some missing methods in nuget), so the build needs to rely on a container that has the proper setup applied.
See https://github.com/nventive/docker/blob/master/wasm-build/Dockerfile