Skip to content
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

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

Merged
merged 4 commits into from
Apr 12, 2023

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Apr 6, 2023

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 jpobst force-pushed the net-tools branch 3 times, most recently from 0ae1cb0 to 4d21fb7 Compare April 11, 2023 16:31
<_ConfigurationFile>..\..\bin\Build$(Configuration)\merge-configuration.xml</_ConfigurationFile>
<_ConfigurationInputBaseDirectory>..\..\bin\Build$(Configuration)\api\</_ConfigurationInputBaseDirectory>
<_ConfigurationOutputBaseDirectory>..\..\bin\Build$(Configuration)\api\</_ConfigurationOutputBaseDirectory>
</PropertyGroup>

<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
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
Contributor Author

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
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
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 main Apr 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-actions github-actions bot locked and limited conversation to collaborators Jan 22, 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