-
Notifications
You must be signed in to change notification settings - Fork 529
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
[Xamarin.Android.Build.Tasks] fix the NuGetizer 3000 #3379
Conversation
Fixes: http://work.azdo.io/917139 Context: https://github.com/NuGet/Home/wiki/NuGetizer-Core-Features The NuGetizer 3000, was failing on Xamarin.Android 9.4 with: The "FilterAssemblies" task was not given a value for the required parameter "DesignTimeBuild". This tool runs a `GetPackageContents` MSBuild target that is defined here: https://github.com/NuGet/NuGet.Build.Packaging/blob/dev/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.targets#L201 Since this isn't a `Build` or a `Compile`, neither of these targets will run: * `_SetupDesignTimeBuildForBuild` * `_SetupDesignTimeBuildForCompile` I don't think we can make the `_AddAndroidCustomMetaData` MSBuild target (that runs `<FilterAssemblies/>`) depend on either of these. The simple fix is to just remove `[Required]` from the `DesignTimeBuild` property, as it will be fine for it to default to `false`.
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.
Thanks 👍
Any updates on a release of this fix? We're in the process of evaluating VS2019 16.2 coming from 16.1.3, but our Release builds which generate NuGet packages are failing with this error message. |
@jalbertSyncroTech you didn't mention how you are running your build, but you can workaround by setting the MSBuild property:
You can also try setting it in your |
Thanks @jonathanpeppers! Explicitly setting DesignTimeBuild to false resolved the error message, I was able to add this to a .targets file that's we reference from every .csproj in our solution that does NuGet packaging. For reference, we use VS2019 both for TFS continuous integration builds and for developer IDE builds. I'd expect that any Xamarin.Android users who create NuGet packages may run into this, so you may want to add a comment to the VS2019 16.2 Release Notes. |
Fixes: http://work.azdo.io/917139 Context: https://github.com/NuGet/Home/wiki/NuGetizer-Core-Features The NuGetizer 3000, was failing on Xamarin.Android 9.4 with: The "FilterAssemblies" task was not given a value for the required parameter "DesignTimeBuild". This tool runs a `GetPackageContents` MSBuild target that is defined in the [`NuGet.Build.Packaging` MSBuild targets][0]. Since this isn't a `Build` or a `Compile`, neither of these targets will run: * `_SetupDesignTimeBuildForBuild` * `_SetupDesignTimeBuildForCompile` I don't think we can make the `_AddAndroidCustomMetaData` MSBuild target (that runs `<FilterAssemblies/>`) depend on either of these. The simple fix is to just remove `[Required]` from the `FilterAssemblies.DesignTimeBuild` property, as it will be fine for it to default to `false`. [0]: https://github.com/NuGet/NuGet.Build.Packaging/blob/88f9e4b5e95c0d2b7b7ac12fb721675a851fcd5d/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.targets#L201
Fixes: http://work.azdo.io/917139
Context: https://github.com/NuGet/Home/wiki/NuGetizer-Core-Features
The NuGetizer 3000, was failing on Xamarin.Android 9.4 with:
This tool runs a
GetPackageContents
MSBuild target that is definedhere:
https://github.com/NuGet/NuGet.Build.Packaging/blob/dev/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.targets#L201
Since this isn't a
Build
or aCompile
, neither of these targetswill run:
_SetupDesignTimeBuildForBuild
_SetupDesignTimeBuildForCompile
I don't think we can make the
_AddAndroidCustomMetaData
MSBuildtarget (that runs
<FilterAssemblies/>
) depend on either of these.The simple fix is to just remove
[Required]
from theDesignTimeBuild
property, as it will be fine for it to default tofalse
./cc @mrward @kzu