2
votes

currently i´m playing around with ASP.NET MVC development under windows with VS2015. Until now i made some hello world beginner tutorials...

I wondered if it is possible to just copy the VS project folder from windows to a ubuntu virtual machine and run it there with monodevelop?! So i setup a VM with Ubuntu,installed mono, monodevelop etc.. and made the same hello world tutorials there, which worked. However, when i copy the windows project to some directory of the ubuntu vm and open it with monodevelop, i always get the following error message when trying to build:

/home/Projects/Asp.Net/TestAspNet/CSC: Error CS0041: Unexpected error writing debug information -- 'The method or operation is not implemented.' (CS0041) (TestAspNet)

Ubuntu / monodevelop setup:

MonoDevelop Version 5.10 Installation UUID: 65380f1c-f5cd-4b10-bb22-ceecad263cf0 Runtime: Mono 4.4.1 (Nightly 4.4.1.0/4747417 Wed Jun 22 11:14:49 UTC 2016) (64-bit) GTK+ 2.24.10 (Ambiance theme)

Build Information Build information unavailable

Operating System Linux Linux ubuntu 3.13.0-92-generic #139~precise1-Ubuntu SMP Wed Jun 29 21:30:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Edit: Asp.Net Project under Windows:

VS2015, Target-Framework 4.5, Empty MVC Template 4.5

I googled the error message but did not find something which helped me fixing the problem. Anyway, i don´t know if the "just copy from windows, run with monodev - done" approach is a valid one. But it would be great if it were that simple.

Thanks in advance!

Update:

I updated NuGet Packages in monodevelop, cleaned and rebuild and now i got the following error:

/home/Projects/Asp.Net/FromVS2015/TestAspNet/TestAspNet/CSC: Error CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.amd64.dll' (CS0041)

I build the project again with VS2015 Debug - x86, this time (before it was AnyCpu), copied it to the ubuntu machine and bang:

got the same error:

/home/Projects/Asp.Net/TestAspNet/CSC: Error CS0041: Unexpected error writing debug information -- 'The method or operation is not implemented.' (CS0041) (TestAspNet)

1
I just added an empty controller returning "Hello world". Which files do you want me to post?GinSonic
In this case, it seems that your Mono version does't provide implementation of some internal asp.net methods. Which version of asp mvc do you use?madmanul
i edited the question: VS2015, Target-Framework 4.5, Empty MVC Template 4.5GinSonic
Accourding to this mono-project.com/docs/about-mono/compatibility mono doesn't provide some features for async. Make sure you don't have any async actions(actions which returns Task).madmanul

1 Answers

2
votes

In theory your project should be binary (MSIL) compatible, in other words you should be able to copy the compiled .exe or .dll over and run it. However the devil is most often in the details and I'm not sure how you would host an MVC project.

You might have an easier time with MVC6 and ASP.NET Core, which has recently been released and is designed from the ground up to be cross-platform and has good support for self-hosting, at the expense of having a smaller API surface area than the full .NET Framework. I personally haven't found that to be too much of a limitation though. Visual Studio Code is a pretty good cross-platform editor/IDE, too.