Skip to content

Convert /tools and /build-tools projects from net472 to $(DotNetStableTargetFramework) - #7943

Merged
jpobst merged 4 commits into
mainfrom
net-tools
Apr 12, 2023
Merged

Convert /tools and /build-tools projects from net472 to $(DotNetStableTargetFramework)#7943
jpobst merged 4 commits into
mainfrom
net-tools

Conversation

@jpobst

@jpobstjpobst commented Apr 6, 2023

Copy link
Copy Markdown
Contributor

Many of our projects in /tools and /build-tools target net472. Update them to instead target $(DotNetStableTargetFramework).

A side-effect of this is that there is no longer an .exe built, so we also need to update everything in our build system that calls these tools to use dotnet foo.dll instead of mono foo.exe.

@jpobst
jpobstforce-pushed the net-tools branch 3 times, most recently from 0ae1cb0 to 4d21fb7CompareApril 11, 2023 16:31
@jpobst
jpobst marked this pull request as ready for review April 11, 2023 22:52
@jpobst
jpobst requested a review from pjcollinsApril 11, 2023 22:52

<Exec
Command="$(ManagedRuntime) $(ManagedRuntimeArgs) $(ApiMerge) -config=$(_ConfigurationFile) -config-input-dir=$(_ConfigurationInputBaseDirectory) -config-output-dir=$(_ConfigurationOutputBaseDirectory)" />
Command="dotnet $(ApiMerge) -config=$(_ConfigurationFile) -config-input-dir=$(_ConfigurationInputBaseDirectory) -config-output-dir=$(_ConfigurationOutputBaseDirectory)" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use the dotnet we provision? &quot;$(DotNetPreviewTool)&quot;

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both api-merge and jnienv-gen are built with $(DotNetStableTargetFramework) instead of $(DotNetTargetFramework) so I think dotnet is correct? Although $(DotNetPreviewTool) would work too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TargetFramework=net7.0 wouldn't make it to be built with the system dotnet. Do we want to run it with the same dotnet it was built with?

Outputs="../../src/Mono.Android/Android.Runtime/JNIEnv.g.cs">
<Exec
Command="$(ManagedRuntime) $(ManagedRuntimeArgs) &quot;../../bin/Build$(Configuration)/jnienv-gen.exe&quot; -o ../../src/Mono.Android/Android.Runtime/JNIEnv.g.cs --use-java-interop"
Command="dotnet &quot;../../bin/Build$(Configuration)/jnienv-gen.dll&quot; -o ../../src/Mono.Android/Android.Runtime/JNIEnv.g.cs --use-java-interop"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@jpobst
jpobst merged commit ecb207b into mainApr 12, 2023
@jpobst
jpobst deleted the net-tools branch April 12, 2023 19:10
grendello added a commit to grendello/xamarin-android that referenced this pull request Apr 13, 2023
* main:
Convert `/tools` and `/build-tools` projects from `net472` to `$(DotNetStableTargetFramework)` (dotnet#7943)
grendello added a commit to grendello/xamarin-android that referenced this pull request Apr 14, 2023
* main:
Bump to xamarin/Java.Interop/main@554d819 (dotnet#7951)
[Microsoft.Android.Sdk.ILLink] fix crash when TZ changes (dotnet#7956)
[tests] Port 'Xamarin.Android.JcwGen-Tests.JcwGen-Tests' to .NET (dotnet#7949)
[Xamarin.Android.Build.Tasks] remove `pdb2mdb` (dotnet#7950)
[ci] Add some extra params to configure the test templates (dotnet#7955)
Convert `/tools` and `/build-tools` projects from `net472` to `$(DotNetStableTargetFramework)` (dotnet#7943)
[Xamarin.Android.Build.Tasks] fix cases of missing `@(Reference)` (dotnet#7947)
Bump com.android.tools:r8 from 4.0.52 to 8.0.40 (dotnet#7934)
Bump to xamarin/Java.Interop/main@a172402 (dotnet#7944)
[Xamarin.Android] Remove OpenTK, sqlite-xamarin, System.EnterpriseServices. (dotnet#7940)
[ci] Stop building classic test suites. (dotnet#7938)
Bumping to the correct monodroid commit
Trying to bump monodroid to run debugger-tests
Pass timeout to runtime
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jan 22, 2024
Sign up for freeto 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

@jpobst@grendello@jonathanpeppers@pjcollins