-
Notifications
You must be signed in to change notification settings - Fork 520
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
[dotnet] Add support for 'dotnet pack'. Fixes #12631. #12900
Conversation
Add support for 'dotnet pack', by: 1. Add a workaround for the fact that as soon as a project has a 'NativeReference' item, .NET's MSBuild logic wants to include a 'Native.$(AssemblyName).manifest' file in the NuGet. This obviously breaks, because we don't create such a file, so we work around it by removing the file in question from the corresponding item groups. 2. Add any binding resource packages to the NuGet. 3. Add tests. Fixes dotnet#12631.
$(OutputPath) can be an absolute path, in which case prepending the current directory is wrong. The current directory is the project directory, so by just removing $(ProjectDir) from the path, the existing logic should work both when $(OutputPath) is relative and when it's absolute.
❌ [PR Build] Tests failed on Build ❌Tests failed on Build. API diff✅ API Diff from stable View API diffAPI & Generator diff✅ API Diff (from PR only) (no change) GitHub pagesResults can be found in the following github pages (it might take some time to publish): Test results2 tests failed, 195 tests passed.Failed tests
Pipeline on Agent XAMBOT-1101.BigSur' |
|
||
namespace Xamarin.Utils { | ||
public static class ApplePlatformExtensionsWithVersions { | ||
public static string ToFrameworkWithDefaultVersion (this ApplePlatform @this) |
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.
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.
This is an extension method, which allows you to write methods that kind of work like instance methods. In instance methods you use this
to refer to the instance, and while you can't use this
in an extension method, you can use @this
(the @
sign makes it so that this
isn't a keyword, just a normal variable name), and that makes it look more like an instance method. In other words: it's just a convention to make extension methods look more like instance methods.
Test failures are unrelated:
|
Add support for 'dotnet pack', by:
Add a workaround for the fact that as soon as a project has a
'NativeReference' item, .NET's MSBuild logic wants to include a
'Native.$(AssemblyName).manifest' file in the NuGet. This obviously breaks,
because we don't create such a file, so we work around it by removing the
file in question from the corresponding item groups.
Add any binding resource packages to the NuGet.
Add tests.
Fixes #12631.