Skip to content

Conversation

jonathanpeppers
Copy link
Member

Context: https://docs.microsoft.com/visualstudio/msbuild/customize-your-build?view=vs-2019#customize-the-solution-build

@grendello was hitting a problem building Xamarin.Android on Linux,
every project would fail saying PackDotNet does not exist:

$ make pack-dotnet
...
java-runtime.csproj : error MSB4057: The target "PackDotNet" does not exist in the project.

Reading the docs for Before.*.sln.targets:

When MSBuild builds a solution file, it first translates it
internally into a project file and then builds that. The generated
project file imports before.{solutionname}.sln.targets before
defining any targets...

before. is all lowercase... Renaming the file fixed the build on Linux.

Context: https://docs.microsoft.com/visualstudio/msbuild/customize-your-build?view=vs-2019#customize-the-solution-build

@grendello was hitting a problem building Xamarin.Android on Linux,
every project would fail saying `PackDotNet` does not exist:

    $ make pack-dotnet
    ...
    java-runtime.csproj : error MSB4057: The target "PackDotNet" does not exist in the project.

Reading the docs for `Before.*.sln.targets`:

> When MSBuild builds a solution file, it first translates it
> internally into a project file and then builds that. The generated
> project file imports `before.{solutionname}.sln.targets` before
> defining any targets...

`before.` is all lowercase... Renaming the file fixed the build on Linux.
@jonpryor jonpryor merged commit e2c3b38 into dotnet:master Dec 8, 2020
grendello pushed a commit to grendello/xamarin-android that referenced this pull request Dec 8, 2020
Context: https://docs.microsoft.com/visualstudio/msbuild/customize-your-build?view=vs-2019#customize-the-solution-build

@grendello was hitting a problem building Xamarin.Android on Linux,
every project would fail saying `PackDotNet` does not exist:

	$ make pack-dotnet
	...
	java-runtime.csproj : error MSB4057: The target "PackDotNet" does not exist in the project.

Reading the docs for `Before.*.sln.targets`:

> When MSBuild builds a solution file, it first translates it
> internally into a project file and then builds that. The generated
> project file imports `before.{solutionname}.sln.targets` before
> defining any targets...

`before.` is all lowercase.

Renaming the file to use `before` and not `Before` fixes the build
on Linux.
@jonathanpeppers jonathanpeppers deleted the before.xamarin.android.sln.targets branch December 8, 2020 16:32
pjcollins added a commit to dotnet/java-interop that referenced this pull request Oct 13, 2021
Context: dotnet/android#5381

Automatic importing of `before*.targets` and `after*.targets` files is
case sensitive on Linux, and only lowercase files will work.
pjcollins added a commit to dotnet/java-interop that referenced this pull request Oct 13, 2021
Context: dotnet/android#5381

Automatic importing of `before*.targets` and `after*.targets` files is
case sensitive on Linux, and only lowercase files will work.
@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 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.

4 participants