System namespaces missing MonoDevelop on fresh install

  • I am wondering if anyone can help me, I did a fresh install of MonoDevelop on a fresh install of Ubuntu 18.04.2 LTS with .NET Core 2.2 installed (everything updated), then followed the instructions layed out at Mono Download Offical. I have no errors or warnings during installation.

    When I create any type of project or open one, all the system namespaces are missing?

    I have checked here:


    When I build / Clean any project I get:

    /home/ant/.cache/MonoDevelop/7.0/MSBuild/27259_1/Microsoft.CSharp.CurrentVersion.targets(5,5): Error MSB4019: The imported project "/home/ant/.cache/MonoDevelop/7.0/MSBuild/27259_1//Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. (MSB4019) (sadsad)


  • I solved it temporarily: I went to the Namespace/Class options and under Run - Default - Advanced I selected Execute in .NET runtime -> Mono It fixes the problem until i restart Monodevelop. I'm having this problem since this morning, even after a fresh reinstall. I am using Ubuntu MATE 18.04

  • This was a problem with mono its self, mono updated and was using a different version of MsBuild which the IDE could not use/understand. So I pulled the preview repository, as they added a fix there.

    To fix:

    purge monodevelop and mono-devel (with others) and install from here Preview - Stable until they patch the normal repository



  • S

    I have a superview with three subviews. Two of those subviews are fixed in size and position within the superview, but the third can vary in size depending on its contents.

    I have set up auto layout constraints to set the size and position of each of the sub views, but what I would like to happen is that when the contents of the third view change, the superview should resize to be able to display it fully.

    I have implemented - (NSSize) intrinsicContentSize on that subview so that it returns the size it would like to be, but I can't work out how to add a constraint which will trigger the superview to resize.

    Any ideas?


    I've got this working by adding constraints to the view like this:

    sizeWidthConstraint = [[NSLayoutConstraint constraintsWithVisualFormat:@"H:[self(==viewWidth)]" options:0 metrics:metrics views:views] lastObject]; sizeHeightConstraint = [[NSLayoutConstraint constraintsWithVisualFormat:@"V:[self(==viewHeight)]" options:0 metrics:metrics views:views] lastObject];

    where "viewWidth" and "viewHeight" are keys in the metrics dictionary with the desired values. In udpateConstraints I can then analyse the contents of my view and do this:

    [sizeHeightConstraint setConstant: size.height]; [sizeWidthConstraint setConstant: size.width];

    to set new values and the next layout will cause the view to be resized.

    UPDATE in answer to panupan's question:

    When you create a constraint in this way, you can put in what is essentially a variable name. In this case, those names are viewWidth and viewHeight. They're known as the constants of the constraint. You also pass in a dictionary, called the metrics, to the [NSLayoutConstrating constraintsWithVisualFormat:...] call that give values for those constants.

    So, in this case, I start out with the default height and width for my view as the values for the metrics dictionary keys viewWidth and viewHeight. Later on, I use the setConstant: method to change those values. In the example above, size is a CGSize structure that I have calculated from the contents of the view (i.e. based on the sizes of its subviews) and I am using the width and height values to adjust the constants.

    This doesn't achieve quite what I was after, in that it doesn't cause the size of my view to re-size automatically based on the intrinsic sizes of the subviews, but it does give me a way to re-size it manually.

    read more
  • S

    In React, it is common for a component to be passed a factory function that tells the component how to render its children (e.g. the render props pattern). This tends to happen when the component needs to render multiple children that follow a certain template.

    In Plotly Dash (which is wrapper around React), it seems that we can pass components to other components, via composition, e.g.

    <pre class="lang-py prettyprint-override">``` app.layout = html.Div(children=[ html.H1(children='Hello Dash'), html.Div(children=''' Dash: A web application framework for Python. '''), ]) However, it seems we can't pass factory functions to components, since it's explicitly forbidden in the guide: > JavaScript functions are not valid input arguments Given this, how can we imitate this factory function pattern in a Dash custom component? I'm trying to create a Dash wrapper for react-awesome-query-builder, which wants me to invoke it like this, where `get_children` is a factory function that returns a component.

    <pre class="lang-js prettyprint-override">```


    My current idea is that we can pass in a template component to the Query component in Dash, which it can then clone with React.cloneElement(), and modify its props, letting me use it like this:

    <pre class="lang-py prettyprint-override">``` app.layout = Query(child_template=html.Div("Template")) Will this work? If not, is there any way to make these higher order components in Dash?

    read more
  • S

    A similar question on SO where the OP seems to have solved it:

    New syscall not found (linux kernel 3.0.0) where should I start looking?

    The file seems to be arch/x86/kernel/syscall_table_32.c.

    read more
  • S

    For systems where audit is enabled, a table of the syscalls may be easily retrieved with:

    ausyscall --dump

    For example:

    $ ausyscall --dump Using x86_64 syscall table: 0 read 1 write 2 open 3 close 4 stat 5 fstat 6 lstat 7 poll 8 lseek 9 mmap 10 mprotect ...SNIP...

    read more
  • S

    Create a testing folder in src root: src/linux-3.4/testing/, then put inside this folder:
    - a file that contains syscall code: strcpy.c

    #include <linux/linkage.h> #include <linux/kernel.h> asmlinkage long sys_strcpy(char *dest, char *src) { int i=0; while(src[i]!='\0') { dest[i]=src[i++]; } dest[i]='\0'; printk(" Done it "); return 0; }

    and the Makefile that contains just the following line:


    Add an entry to the syscall table and the prototype of the function:
    - edit the file src/linux-3.4/arch/x86/syscalls/syscall_32.tbl by adding this line to the entry 223 that is free

    223 i386 strcpy sys_strcpy

    Edit the file src/linux-3.4/include/linux/syscalls.h by adding the prototype of the function

    asmlinkage long sys_strcpy(char *dest, char *src);

    Edit the main Makefile in the src root (src/linux-3.4/Makefile) by adding the testing folder created before, as follow:

    core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ testing/

    read more