I am trying to generate java binding library for this java project material-camera (https://github.com/afollestad/material-camera) the jar files are available on https://dl.bintray.com/drummer-aidan/maven/com/afollestad/material-camera/0.4.4/
unfortunately, the dll is empty, can someone please help me here?
Trying to bind that .aar myself, I got one error initially:
Error CS0234: The type or namespace name 'ICameraUriInterface' does not exist in the namespace 'Com.Afollestad.Materialcamera.Internal'. Are you missing an assembly reference? (CS0234) (MaterialCamera)
Looking in the jar, I see that the java interface CameraUriInterface is private, so I changed it to public by adding the following to the MetaData.xml file:
<attr path="/api/package[#name='com.afollestad.materialcamera.internal']/interface[#name='CameraUriInterface']" name="visibility">public</attr>
Add the above line between the <metatdata> </metadata> tags. After adding the above the binding built without error and a .dll was created.
Related
I have added a reference for "Xamarin.ios" to my project and it is working fine locally. I have committed the code and made a build for it in appcenter but it is failing and showing me error as mentioned below.
/Users/runner/work/1/s/Project/ViewModels/OrderViewModel.cs(19,7): error CS0246: The type or namespace name 'Foundation' could not be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/1/s/Project/Project.csproj]
/Users/runner/work/1/s/Project/ViewModels/OrderViewModel.cs(20,7): error CS0246: The type or namespace name 'UIKit' could not be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/1/s/Project/Project.csproj]
Time Elapsed 00:00:08.79
##[error]Error: The process '/Library/Frameworks/Mono.framework/Versions/6_12_11/bin/msbuild' failed with exit code 1
I have also tried with various mono versions but it did not work for me. Can you please suggest me the solution for the same?
Ensure that Xamarin.iOS has referenced in iOS project not shared prject, because netstandard project can't use any API specific to Xamarin.iOS .
Open your iOS csproj file to check if <Reference Include="Xamarin.iOS" /> exists there .
Refer to https://github.com/xamarin/xamarin-macios/issues/10191 .
I'm pretty new to OS X (4 days with my new mac), and I am working on setting up an environment where I can debug my Asp.Net 5 web project locally with the debugger built into Visual Studio Code, specifically getting the breakpoint to work when attaching to mono.
I followed these instructions for installing asp.net 5 and visual studio code. (http://docs.asp.net/en/latest/getting-started/installing-on-mac.html)
I then installed yeoman, and scaffolded out an aspnet project.
I ran commands dnu restore, dnu build, and dnx web.
The project runs locally on Kestrel at localhost:5000 just fine. I can also attach it to mono via the VS Code debugger.
The issue arises when I try to set breakpoints in the C# code. The debugger will not hit them.
After doing some research I found that I needed to specify the Startup.cs file to mono as the one to debug. (https://code.visualstudio.com/Docs/editor/debugging)
But after running mcs -debug Startup.cs, I get these errors:
Startup.cs(5,17): error CS0234: The type or namespace name `AspNet' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(6,17): error CS0234: The type or namespace name `AspNet' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(7,17): error CS0234: The type or namespace name `AspNet' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(8,17): error CS0234: The type or namespace name `Data' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(9,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(10,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(11,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(12,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(13,16): error CS0234: The type or namespace name `Models' does not exist in the namespace `palmtree'. Are you missing an assembly reference?
Startup.cs(14,16): error CS0234: The type or namespace name `Services' does not exist in the namespace `palmtree'. Are you missing an assembly reference?
Startup.cs(20,24): error CS0246: The type or namespace name `IHostingEnvironment' could not be found. Are you missing an assembly reference?
Startup.cs(20,49): error CS0246: The type or namespace name `IApplicationEnvironment' could not be found. Are you missing an assembly reference?
Startup.cs(39,16): error CS0246: The type or namespace name `IConfigurationRoot' could not be found. Are you missing an assembly reference?
Startup.cs(42,39): error CS0246: The type or namespace name `IServiceCollection' could not be found. Are you missing an assembly reference?
Startup.cs(62,31): error CS0246: The type or namespace name `IApplicationBuilder' could not be found. Are you missing an assembly reference?
Startup.cs(62,56): error CS0246: The type or namespace name `IHostingEnvironment' could not be found. Are you missing an assembly reference?
Startup.cs(62,81): error CS0246: The type or namespace name `ILoggerFactory' could not be found. Are you missing an assembly reference?
It looks like mono cannot debug compile the Startup.cs properly. Is anyone else getting this error when trying to set up debugging? Or does anyone have breakpoints working with mono, asp.net 5, kestrel, vs code, and OS X?
Debugging Visual Studio Code and ASP.NET 5 are in preview and at this
time debugging ASP.NET 5 is not supported in Visual Studio Code (on
any platform). Rest assured, we are working hard to bring these
experiences to you in the near future.
Ref: https://code.visualstudio.com/docs/runtimes/ASPnet5
The Mono section that you are referring to is for compiling and attaching to a mono/.Net program (not an dnx ASP.NET-based one). ASP.NET 5 applications are compiled using the Roslyn compiler, not Mono's mcs.
Debugging a Mono Application Example:
Create a directory, cd into it and type code . to start VSCode using that directory.
mkdir monoconsoletest
cd monoconsoletest
code .
Create a new file in VSCode
Name it program.cs
Enter the following code into the editor:
using System;
namespace consoleViaVSCode
{
class MainClass
{
public static void Main (string[] args)
{
Console.WriteLine ("Hello VSCode!");
}
}
}
You could compile and run this in a shell, but let create a tasks.json file so we can do it via the Command Palette.
Create a tasks.json file:
The next step is to set up the task configuration. To do this open the Command Palette with F1 and type in Configure Task Runner, press Enter to select it.
This will create a sample tasks.json file in the .vscode folder. The initial file has a large number of examples within it. Highlight it all, delete it and add:
{
"version": "0.1.0",
"command": "mcs",
"isShellCommand": true,
"showOutput": "silent",
"args": ["-debug", "program.cs"]
}
Now you have one task that you can execute via task mcs down the Command Palette and this task will build your program.cs using Mono's mcs compiler with the '-debug' option that will create a program.exe.mdb file that has the debugging symbols for the program.exe application.
So execute that task and if you have no errors, a program.exe and program.exe.mdb` will show up in the file pane:
If you have any errors, they will show up in the Output pane (right of the source code pane).
Now lets add a task to run your program with mono .Net runtime with the options for it to wait for a debugger to attach.
Note: I would show you a mono debugger task but running a shell process like that is broken in VSC 0.10.1. and you would be to wrap it in a glup routine... :-/ so...
In the process.cs, set a break point on the Console.Write.... line:
From the shell that you started VSCode from:
mono --debug --debugger-agent=transport=dt_socket,server=y,address=127.0.0.1:5858 program.exe
Back in VSCode:
Click the Bug Icon and than the Config\Gear Icon and select "C# mono" to generate the default "attach" configuration. Select "Attach" and click green Start button:
And you will hit your breakpoint:
Following the directions at http://developer.xamarin.com/guides/android/advanced_topics/java_integration_overview/binding_a_java_library_(.jar)/api_metadata_reference/#Metadata.xml_Transform_File
<attr path="/api/package[#name='com.mycompany.myapi]" name="managedName">MyCompany.MyAPI</attr>
In this example, a Java library with a package
com.mycompany.myapi is mapped to the .NET namespace MyCompany.MyAPI.
I am trying to rename the namespace of a binding library project I created. The project successfully compiles before trying to do any transformations. Looking at the generated obj/debug/api.xml file the first few lines show
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<api>
<package name="android_serialport">
...
So to change the namespace from android_serialport to something like MyCompany.Ports.IO I am editing Transofrms/Metadata.xml to be
<metadata>
<attr path="/api/package[#name='android_serialport]" name="managedName">MyCompany.Ports.IO</attr>
</metadata>
However, with this added line I get an error that is rather cryptic:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Bindings.targets(5,5): Error MSB6006: "generator.exe" exited with code -532462766. (MSB6006) (SerialPort)
The library I'm trying to create bindings to is was created in Android Studio to generate an aar. Without the transformation line added, everything compiles and I am able to reference it with no problem.
Anyone have experience with binding library transformations failing?
The error message is coming from the bindings generator. I was unable to find any docs on the error code, but it's being thrown due to a typo in the edited Transforms/Metadata.xml file:
path="/api/package[#name='android_serialport]"
should be
path="/api/package[#name='android_serialport']"
Notice the missing ' at the end of the #name. It's too bad the error message doesn't lead you to this.
I'm uploading my first application to AppHarbor and I'm getting the following error:
"The type or namespace name 'WebActivator' could not be found (are you missing a using directive or an assembly reference?)"
The solution is building correctly on the dev environment and on other build servers using MSBuild.
I couldn't find any help on the AppHarbour support page, any idea what could be happening?
Thanks
You can use the command into your nuget:
Install-Package WebActivator -version 1.5.3
EDIT
Here's a link to the nuget page.
Install-Package WebActivatorEx
I had a same problem in below code:
[assembly: WebActivator.PreApplicationStartMethod(
typeof(myApp.Web.App_Start.BreezeWebApiConfig), "RegisterBreezePreStart")]
And I found that in new versions of WebActivator its namespace is changed to WebActivatorEx; So below code solve my problem:
[assembly: WebActivatorEx.PreApplicationStartMethod(
typeof(myApp.Web.App_Start.BreezeWebApiConfig), "RegisterBreezePreStart")]
Looks like WebActivator DLL is not copied to bin folder. Make sure in VS you have Copy Local set to true and that your deployment script includes this file.
You might want to clean your local solution / deployment folder by deleting all instances of WebActivator to try to replicate the problem.
I have a model with 2 animations, created in Blender and exported to fbx.
Referencing the XNAnimation.dll works, however when I reference the XNAnimationPipline.dll in the Content project I get a build error.
The "BuildContent" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'XNAnimationPipeline, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0c21691816f8c6d0' or one of its dependencies.
The system cannot find the file specified.
File name: 'XNAnimationPipeline, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0c21691816f8c6d0'
I have recently upgraded to XNA3.1 and am using the latest XNAnimation library.
Any ideas?
Thanks
Rebuilding the source code sorts it out
This explains