Skip to content

Commit

Permalink
better help, change priority of processing help request. (#15660)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-hawley authored Aug 9, 2022
1 parent 20825e1 commit 10b6dff
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
12 changes: 10 additions & 2 deletions tools/nnyeah/nnyeah/Errors.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion tools/nnyeah/nnyeah/Errors.resx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,26 @@
</data>

<data name="N0007" xml:space="preserve">
<value>If you want to compare assemblies, the earlier and later assembly options *must* be set.</value>
<value>nnyeah is a tool for converting legacy Xamarin assemblies (pre .NET 6)
to work with .NET 6 or later. It does this by scanning the --input assembly for
dependencies of legacy methods, types, or fields and converts them to references
in the --microsoft-assembly and writes the result in the --ouput assembly.
nnyeah attempts to find the legacy Xamarin assembly automatically. If it can't
find it, you will need to supply a path to it with the --xamarin-assembly
argument.
nnyeah needs to have a path to target Microsoft assembly using the
--microsoft-assembly argument. If you do not have a specific version in mind,
you can use this command for iOS:
find $(dirname $(which dotnet)) -name Microsoft.iOS.dll -print | grep ref
or this command for macOS:
find $(dirname $(which dotnet)) -name Microsoft.macOS.dll -print | grep ref
These commands may list more than one choice. You will probably want to use the
one with the highest version.
Example invocation for an assembly that originally targets Xamarin.iOS.dll:
dotnet nnyeah --input=/path/to/AssemblyToConvert.dll \
--output=/path/to/Converted.dll \
--microsoft-assembly=/path/to/Microsoft.iOS.dll
</value>
</data>

<data name="N0008" xml:space="preserve">
Expand Down
15 changes: 7 additions & 8 deletions tools/nnyeah/nnyeah/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ static int Main2 (string [] args)
doHelp = true;
}

if (doHelp) {
options.WriteOptionDescriptions (Console.Out);
Console.Out.WriteLine (Errors.N0007);
return 0;
}

if (infile is null || outfile is null) {
throw new ConversionException (Errors.E0014);
}
Expand All @@ -53,14 +59,7 @@ static int Main2 (string [] args)
throw new ConversionException (Errors.E0015);
}

if (doHelp) {
options.WriteOptionDescriptions (Console.Out);
Console.Out.WriteLine (Errors.N0007);
return 0;
}
else {
return AssemblyConverter.Convert (xamarinAssembly, microsoftAssembly!, infile!, outfile!, verbose, forceOverwrite, suppressWarnings);
}
return AssemblyConverter.Convert (xamarinAssembly, microsoftAssembly!, infile!, outfile!, verbose, forceOverwrite, suppressWarnings);
}
}

Expand Down

7 comments on commit 10b6dff

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

❌ Status for 'xamarin-macios - sample testing (build)': failure.

  • ❌ Debug_iPhone_AF: Failed
  • ❌ Debug_iPhone_GR: Failed
  • ❌ Debug_iPhone_SZ: Failed
  • ❌ Debug_iPhoneSimulator: Failed
  • ❌ Release_iPhone_AF: Failed
  • ❌ Release_iPhone_GR: Failed
  • ❌ Release_iPhone_SZ: Failed
  • ❌ Release_iPhoneSimulator: Failed
  • ❌ Debug_Mac: Failed
  • ❌ Release_Mac: Failed
  • ❌ PublishPerformanceData: Failed

Please sign in to comment.