Fix non-existing language targets restore by jeromelaban · Pull Request #186 · novotnyllc/MSBuildSdkExtras (original) (raw)
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:
/mnt/c/temp/msbe-linux/ClassLibrary1/ClassLibrary1.csproj error MSB4057: The target "_GetRestoreSettingsPerFramework" does not exist in the project. [/mnt/c/temp/msbe-linux/ClassLibrary1/ClassLibrary1.csproj]
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