Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Context:
https://stackoverflow.com/questions/17709873/how-can-i-invoke-my-msbuild-target-when-msbuild-exe-starts-and-when-it-ends

There is a convention where an MSBuild file named
Before.<SolutionName>.sln.targets will get imported prior to a SLN
file getting built. This enables us to import PrepareWindows.targets
and enable msbuild Xamarin.Android.sln /t:Prepare to work
appropriately.

macOS/linux have remained unchanged, since PrepareWindows.targets
currently only works for Windows. make prepare could be ported to
MSBuild in the future.

Question

Do we need to look into make prepare for the other platforms yet?

If make prepare was fully ported to MSBuild, you could run the same
command to build on any platform:

msbuild Xamarin.Android.sln /t:Prepare /t:Build

I tested, and xbuild looks like it supports the Before.<SolutionName>.sln.targets
convention.

Context:
https://stackoverflow.com/questions/17709873/how-can-i-invoke-my-msbuild-target-when-msbuild-exe-starts-and-when-it-ends

There is a convention where an MSBuild file named
`Before.<SolutionName>.sln.targets` will get imported prior to a SLN
file getting built. This enables us to import `PrepareWindows.targets`
and enable `msbuild Xamarin.Android.sln /t:Prepare` to work
appropriately.

macOS/linux have remained unchanged, since `PrepareWindows.targets`
currently only works for Windows. `make prepare` could be ported to
MSBuild in the future.
@dnfclas
Copy link

dnfclas commented Oct 18, 2017

@jonathanpeppers,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@jonpryor jonpryor merged commit e699140 into dotnet:master Oct 18, 2017
@jonpryor
Copy link
Contributor

Do we need to look into make prepare for the other platforms yet?

Not yet. It would be an interesting exercise, but it isn't required at this time.

@jonathanpeppers jonathanpeppers deleted the xamarin.android.sln-prepare branch October 18, 2017 19:42
Redth pushed a commit to Redth/xamarin-android that referenced this pull request Oct 30, 2017
Context: https://stackoverflow.com/questions/17709873/how-can-i-invoke-my-msbuild-target-when-msbuild-exe-starts-and-when-it-ends

There is a convention where an MSBuild file named
`Before.<SolutionName>.sln.targets` will get imported prior to a SLN
file getting built. This enables us to import `PrepareWindows.targets`
and enable `msbuild Xamarin.Android.sln /t:Prepare` to work
appropriately.

macOS/Linux remain unchanged, since `PrepareWindows.targets`
currently only works for Windows.
jonpryor pushed a commit that referenced this pull request Feb 11, 2022
Fixes: dotnet/java-interop#945

Changes: dotnet/java-interop@32635fd...7dc270d

  * dotnet/java-interop@7dc270db: [build] set $(ProduceReferenceAssemblyInOutDir)=True (#949)
  * dotnet/java-interop@f91b0770: [Xamarin.Android.Tools.Bytecode] Improve Kotlin metadata matching (#946)
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants