Enable Entity Framework migrations in Mono

All of the Entity Framework Migrations commands are just thin wrappers over an underlying API. To enable migrations, simply create a new class that derives from DbMigrationsConfiguration<TContext> in your project. For Add-Migration use code similar to the following. var config = new MyMigrationsConfiguration(); var scaffolder = new MigrationScaffolder(config); var migration = scaffolder.Scaffold(“Migration1”); File.WriteAllText(migration.MigrationId + “.cs”, … Read more

Is .NET Execution Environment (DNX) similar to Mono?

Yes, DNX compares pretty well to Mono’s mono.exe. Or for that matter the runtime of other VM languages like Java (java.exe) or Python (python.exe). They all solve the same chicken-and-egg problem, they run on operating systems that don’t know beans about the VM. It has to be initialized first, the program’s entry point needs to … Read more

What is the best way to run ServiceStack on Linux / Mono?

Update for Linux From the v4.5.2 Release ServiceStack now supports .NET Core which offers significant performance and stability improvements over Mono that’s derived from a shared cross-platform code-base and supported by Microsoft’s well-resourced, active and responsive team. If you’re currently running ServiceStack on Mono, we strongly recommend upgrading to .NET Core to take advantage of … Read more

Custom Layout for DialogFragment OnCreateView vs. OnCreateDialog

I had the same exception with the following code: public class SelectWeekDayFragment extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { return new AlertDialog.Builder(getActivity()) .setMessage(“Are you sure?”).setPositiveButton(“Ok”, null) .setNegativeButton(“No way”, null).create(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.week_day_dialog, container, false); return view; } } You must choose … Read more

Develop Android app using C#

Having used Mono, I would NOT recommend it. The Mono runtime is bundled with your app, so your apk ends up being bloated at more than 6MB. A better programming solution for C# would be dot42. Both Mono and dot42 are licensed products. Personally, I would recommend using Java with the IntelliJ IDEA dev environment. … Read more

Method ‘RouteCollection.get_AppendTrailingSlash’ not found when using Razor Url helpers in ASP.NET MVC 5 Mono

The latest news afaik is that Miguel rejected my minimal pull request last year but you can see at the bottom of that Pull Request that a couple of others have got builds on github which include this and more. I can’t see anyone’s got a pull request accepted for mono mainline. The way forward … Read more

.NET Core vs Mono

Necromancing. Providing an actual answer. What is the difference between .Net Core and Mono? .NET Core now officially is the future of .NET. It started for most part with a re-write of the ASP.NET MVC framework and console applications, which of course includes server applications. (Since it’s Turing-complete and supports interop with C dlls, you … Read more