How to create .aar file with Embeddinator-4000 - c#

I have a simple Android application wrote in c# and Xamarin. My purpose is to import this project into Android native application. I saw that Embeddinator-4000 can do the work and I installed it via Nuget, but unfortunately I can't find how to export an .aar file.
In project properties ->Build Events->Post Build Event command line I put this command:
set OUTPUT="$(SolutionDir)output"
if exist %OUTPUT% rmdir /S /Q %OUTPUT%
"$(SolutionDir)packages\Embeddinator-4000.0.3.0\tools\Embeddinator-4000.exe" "$(TargetPath)" --gen=Java --platform=Android --outdir=%OUTPUT% -c
After build I get the error:"The command exited with code 3"

After build I get the error:"The command exited with code 3"
As listed in this documentation, code 3 means the system cannot find the path specified.
Please check your path in the command.

Related

Uninstalling .NET 7.0

Let me preface this saying I have a M2 MacBook.
I have accessed the external uninstaller (here: https://github.com/dotnet/cli-lab/releases)
Final commands from Microsoft are not working (here: https://learn.microsoft.com/en-us/dotnet/core/additional-tools/uninstall-tool?tabs=macos#step-1---display-installed-net-sdks-and-runtimes)
I finally got access to the uninstaller through Terminal and tried using some of the commands from the second link. It just spits back that it is an unrecognized command to everything. I want it to uninstall the .NET 7.0.
It appears that you have the dotnet-core-uninstall tool in a directory named 'dotnet-core-uninstall' and that the directory is not in the PATH.
To run an executable that is not in the PATH but is in the current directory, you need to be explicit about the location of the executable and use ./, e.g ./dotnet-core-uninstall.
The following is correct:
./dotnet-core-uninstall -h
As you show in your screenshot, this command works and displays the help. The help shows that the usage of the command is:
dotnet-core-uninstall [options] [command]
You can't use an option for the command without the command, e.g. --help should be ./dotnet-core-uninstall --help.
The command to list should be:
./dotnet-core-uninstall list
The command to get help on dry-run is:
./dotnet-core-uninstall dry-run --help
Dry runs for 7.0 for SDK and runtimes are the following commands:
./dotnet-core-uninstall dry-run --major-minor 7.0 --sdk
./dotnet-core-uninstall dry-run --major-minor 7.0 --runtime
If the dry runs look correct, change dry-run to remove and use sudo to run as admin.
sudo ./dotnet-core-uninstall remove --major-minor 7.0 --sdk

Tasklist is not recognized as internal or external command

I have built an asp.net MVC application, which is working fine on IIS in the same machine where source project is laying. However I have to change some code in my source project but when I start my project in visual studio 2013, builds process runs and failed. It shows the following error.
1> 'tasklist' is not recognized as an internal or external command,
1> operable program or batch file.
1> C:\Program Files
(x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1131,5):
error MSB3073: The command "tasklist /fi "imagename eq iisexpress.exe"
|find ":" > nul
1>C:\Program Files
(x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1131,5):
error MSB3073: if errorlevel 1 taskkill /f /im "iisexpress.exe""
exited with code 255.
When I ran this command taskkill /f /im iisexpress.exe then no process is found message appear.
do you know what is causing this?
depending on the version of windows you are currently running, taskkill is indeed not included.
If you believe that taskkill is included, it is possible that your path is set incorrectly.
I had the same issue on a jenkins that I do not manage myself.
My solution was to adapt the path in the local shell
set PATH=%PATH%;C:\Windows\System32;
however, this was for a .bat file.
For c# i have no solution handy, but maybe this can point you in the right direction.

Problem - 'dispatch' is not recognized as an internal or external command

When I tried to create dispatch-Model for my bot., I am getting following error - 'dispatch' is not recognized as an internal or external command, operable program or batch file.Before using dispatch command, I installed botdispatch using npm install -g botdispatch. But still I am getting this error.
Can you check your NPM folder to see if there is anything with dispatch there? Assuming you're on Windows, this is typically in AppData\Roaming\npm.
PowerShell:
dir $home\AppData\Roaming\npm
CMD:
dir %homepath%\AppData\Roaming\npm.
If dispatch (dispatch.cmd) is there, then it might be a pathing issue. Check your path variables to make sure that that path is there:
CMD:
echo %path%
PowerShell:
($env:path).Split(';')
So I was having this same issue, it turns out I needed to add the path of the NPM folder C:\Users\xxxxxx\AppData\Roaming\npm to my path for Powershell7.
$env:Path += ";C:\Users\xxxxxx\AppData\Roaming\npm"
Where xxxxxx is your userid. After adding this command to Powershell the npm modules began to work.
If you do not see this path by running this command below, then you need to add it with the one above.
($env:path).Split(';')
All of these should be ran inside of a PS7 window, I ran them with Administrator rights when I launched the Powershell 7 window.

MSBuild exited with code 1 error

I am getting following error when trying to build the solution.
Error The command "
copy "D:\Code\..\libs\xyz_ext.x64.dll" "D:\Code\bin\"
copy "D:\Code\..\libs\xyz.x86.dll" "D:\Code\bin\"
" exited with code 1. C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 4714
MSBuild exited with code 1 error
First, just as nozzleman comment "is this the real command (including ..) from the post build event" If yes, this is the reason why you got this error. That because build events follow the same syntax as DOS commands, and DOS never supported wildcard * expansion and \..\ in the path by the shell. So you should specify the full path in the command line.
Besides, if you want to copy the file in all the subfolders of Code, you need some way using existing windows tools (cmd.exe), or powershell with wildcard *, for example, powershell:
This is code in the .ps1 file:
Get-ChildItem "D:\Code\*\libs" -Recurse -Include xyz_ext.x64.dll | Copy-Item -Destination D:\Code\bin
Then execute this PS script by post build event:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file D:\Code\Test.ps1
If \..\ is nor the real command from the post build event, just a shorthand expression. You should check the path of this command. According to the error log "code 1 error", it specify that this command is incorrect. And I have checked this command, the syntax of copy is correct, so the problem is the path is not incorrect, you should double check it.

What are the complete set of steps to fully build a Monotouch app bundle from the command line?

I'd like to know what the complete set of steps is to build a MonoTouch C# app consisting of the main application assembly containing xib files and a set of library assemblies that also possibly contain xib files.
We're trying to automate these steps via a proper MSBuild script (which MonoTouch has yet to support) for various reasons which I won't go into, to focus on the question here.
So far, here's what I've come up with:
1) Compile each assembly using smcs, e.g.
/Developer/MonoTouch/usr/bin/smcs /noconfig
"/out:/Users/bright/src/MonoTouchAppWithLib/AppLib/bin/Debug/AppLib.dll
"/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll"
"/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll"
"/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll"
"/r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll"
/nologo /warn:4 /debug:+ /debug:full /optimize- /codepage:utf8
"/define:DEBUG"
/t:library "/Users/bright/src/MonoTouchAppWithLib/AppLib/Class1.cs"
2) Compile interface definitions: run ibtool on each xib file in each assembly, e.g
/Developer/usr/bin/ibtool
--errors --warnings --notices --output-format human-readable-text
"/Users/bright/src/App/App/ViewController_iPhone.xib"
--compile "/Users/bright/src/App/App/bin/Debug/App.app/ViewController_iPhone.nib"
--sdk "/Developer/Platforms/iPhoneSimulator.platform/Developer/
SDKs/iPhoneSimulator4.3.sdk"
3) Compile to native code:
/Developer/MonoTouch/usr/bin/mtouch
-sdkroot "/Applications/Xcode.app/Contents/Developer"
-v --nomanifest --nosign -sim
"/Users/bright/src/App/App/bin/iPhoneSimulator/Debug/App.app"
-r "/Users/bright/src/App/AppLib/bin/Debug/AppLib.dll"
-r "/Developer/MonoTouch/usr/lib/mono/2.1/System.dll"
-r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll"
-r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll"
-r "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll"
-debug -profiling -nolink -sdk "5.0"
"/Users/bright/src/App/App/bin/iPhoneSimulator/Debug/App.exe"
However, it isn't clear how to do the following (taken from MonoDevelop's build output window), and in what order:
1) Extract embedded content. MonoDevelop just outputs this:
Extracted HelloWorldScreen_iPhone.nib from MtLib.dll
Extracted HelloWorldScreen_iPad.nib from MtLib.dll
2) Update application manifest: There's no command line given in the MonoDevelop build output window.
3) Update debug configuration file: There's no command line given in the MonoDevelop build output window.
4) Update debug settings file: There's no command line given in the MonoDevelop build output window.
And other steps I haven't gotten do yet like app signing and resources.
Hopefully we can get enough information here to make a go of it.
You can run, from a terminal window or from within an MSBuild task, the /Applications/MonoDevelop.app/Contents/MacOS/mdtool tool that is supplied with MonoDevelop. E.g.
/Applications/MonoDevelop.app/Contents/MacOS/mdtool -v build -t:Build "-c:Debug|iPhoneSimulator" /path/to/your/app.csproj
That will build the MonoTouch application, including all your steps above and any future feature that will be added.

Categories

Resources