Monodevelop android error - c#

so i downloaded monodevelop...and it installed xamarin studio 5.0.1...the gtkc# is working well...i made an app and run it...everything went well...when i tried to make an android app with c# thru new solution it said the "MainActivity.cs" couldn't be found.I let the default location in documents/projects and named the solution hello.I also have installed the android development add-in from add-in manager.I can't figure out what's the problem...also i had installed the android tools from eclipse.

I think it has something to do with the licensing, as XamarinStudio + Android / iOS is not a free product. I believe that the "re-branded-as-XamarinStudio" MonoDevelop available from the MonoDevelop website is simply missing the stuff needed to create these types of projects.
While I'd be interested in knowing why MonoDevelop has released a crippled (read broken) version of XamarinStudio, one can simply get the fully-functional "XamarinStudio" from the XamarinStudio website, and it will be able to create these project types without this issue (so long as you have a trial, or full license).
It will still be able to create other types of C# projects, just as MonoDevelop used to, as this whole thing is part of the process of moving away from the MonoDevelop name, and having a single product "XamarinStudio".

Related

Importing winform solution to mono (linux) from VS Code (windows)

I tried to import a winform solution file from VS code (windows) to monodevelop (Linux) but it failed. The error is as follows:
Error while trying to load the project '/home/virtuall_kingg/Camera_GUI/Camera_GUI/Camera_GUI.csproj':
File not found: /home/virtuall_kingg/Camera_GUI/Camera_GUI/Camera_GUI.csproj
I added Camera_GUI.csprojfile also but still the error is same.
Can anybody guide me on how to import solution to mono?
This winform project has become pain in my neck.
Is building the GUI using gtk# in Ubuntu from scratch is the only way?
EDIT: Now you can substitute mono with .NET 5, the common .net framework for all platforms.
You are asking multiple questions here. In Linux you have (limited) support for WinForms through Mono. Depending on how complex is your project, you could port it without modification. If there are p/Invokes, then you won't for sure be able to port it.
Yep, in Linux the "other" big option is Gtk#, which has a long history. If you would want to port the project starting from scratch, it'd be a good option, but it'd involve porting your classes from working with WinForms to Gtk#, which is not impossible, but not trivial either. The feasibility of this would mainly depend on how good that project is architected. Do you have bussiness logic and views separated? If the answer is no, then the process will be tedious, and as hard as lengthy.
MonoDevelop is an IDE for C#, and Visual Studio for Mac is roughly MonoDevelop. It certainly works in Linux... as well as Visual Studio Code. So, there is no need to change anything in that front if you just need to port your code to Linux.
Okay, now, what's the road to follow? I think the best one is to try Mono with WinForms. It'd maybe involve simplify some code in the user interface part, but is certainly feasible. Just remember that you need to install Mono, and if your project is set to target .NET Core, then you need to create another project from scratch and set it to target .NET Framework.
Now, the specific question is that MonoDevelop complains about a missing Camera_GUI.csproj. This means that you've only picked a few files, but not the whole solution. Any IDE (Visual Studio, Visual Studio Code, Rider...), would complain about the same thing. Either remove the project from the solution, or add the project with all its files to the directory in which the solution sits.
So, the answer is: don't change anything if you don't need to retarget your project. Just move to a Linux box or virtual machine, with the whole project and open it in Visual Studio Code Rider, Rider, or MonoDevelop it does not matter. From within the IDE, remove those projects that make no sense in Linux (i.e., windows installer), and then recompile and start the program. Polish those parts of the user interface that need tweaking and that's it.
Should you need more help, please be more specific and provide more info.

Cross-compilation with Visual Studio 2019

I'm using VS2019 under Windows 10 and I'm trying to figure out how to compile for the non-Windows platforms. I'm aware that only some languages support cross-compilation (C# being one of them). So I decided to start off with one of Microsoft's own examples (the Console App for .NET Core). When asking VS2019 to create the Console project, it shows me various image icons which suggest that it'll be buildable for Windows, Linux and macOS - but no matter what I do, I can only make it build the Windows target.
After a bit of research I realized that I need to add this line to my C# project file:-
<RuntimeIdentifiers>win10-x64;osx.10.11-x64;ubuntu.16.10-x64</RuntimeIdentifiers>
but even after adding that line (and re-loading / re-building the project) it staunchly refuses to build anything apart from the Windows target. Over on CodeGuru, one of the devs there tried it for me (under VS2017) and managed to make it work - but I've tried it in VS2019 and also VS2015 and I can't make it work in either of them. Any ideas what I might be doing wrong??
[Edit...]
Thanks Magnetron - if I press Build->Publish I see a totally different dialog from the one you're seeing (and it's the same in both VS2015 and VS2019):-
Even if I follow the Next or Finish buttons I never see the Create Profile option :(
Go to Build > Publish, select Folder and click on Create Profile
Then Click on Edit and change the Deployment Mode to Self-contained. At last, you can specify the target OS in Target Runtime
You can create multiple profiles for each OS, and publish each one individualy as needed.
Edit:
The posted publish dialog is for a .Net Framework Console app, not an .Net Core one. The .Net framework is Windows only, you have to create your project as a .Net Core
Woohoo!! I just ran the VS2019 installer to remind myself how to uninstall (in preparation for tomorrow) and it told me there's already a 16.3.5 available. 16.3.4 only got installed a few hours ago but for the hell of it, I figured I might as well try the newer version - and it's now working !!!

Can a Xamarin project be built with both Visual Studio AND Xamarin Studio?

I know that you can use either of these tools for creating Xamarin projects, but can I also go between using the two of them? Ex: I am on a Mac, and my co-workers is on Windows?
I used to believe it was possible, but the moment we added the Windows project, we can no longer build for iOS.
When we try to build, we receive an error about not being able to import target WIndows.
I understand this, as I'm on a Mac. Even if I exclude the UWP project from the build process, it still throws this error.
How do you write Xamarin projects on both a Mac and a Windows machine?
Yes, you can. However, XS on a Mac cannot build Windows projects (although you should be able to exclude them from the build), and VS on the PC can only build iOS projects with the aid of a Mac to act as a build server. Otherwise the solution files should be portable between the two environments.

How to use SQLite on new Windows 8.1 Store app (Visual Studio 2013)

So, I installed Visual Studio 2013 on my Windows 8.1 box. I want to experiment with it and created a new Windows Store Grid App. I want to persist data on a SQLite database, apparently the database of choice for WinRT apps.
Quickly found links to the vsix needed in order to be able to use the SDK: SQLite download page, and downloaded sqlite-winrt81-3080002.vsix.
Installed it, then in my project, added the reference to the newly installed SDK (right click references, add reference, navigate to Windows, select extensions and tick SQLite for Windows Runtime (Windows 8.1) checkbox.
Also quickly found that it won't compile on Any CPU. On Configuration Manager, selected Debug, x64 active platform, that made me able to compile the application.
Finally, while attempting to use the namespace SQLite I noticed VS 2013 isn't recognizing it. Attempted many things like adding reference to the .dll directly, exploring the component to see which namespaces were available (which doesn't show anything), and I'm quickly running out of ideas. Because it's kinda new thing, and with limited interest, google, the saviour, doesn't want to save me today.
So, how one would be able to use the SQLite SDK in their Visual Studio 2013 projects, targeting Windows Runtime 8.1?
These are the contents of my csproj file
UPDATE
Stupid me, thought there was no managed land (.net) in Metro style land. Sorry for causing any confusion.
I installed the VSIX for SQLite and noticed that it is a native DLL to be used in Windows Store 8.1 C++ apps. It is not for managed C# projects.
The current NuGet package for SQLite from what seems to be the 'official' SQLite team is only working for .NET 4.5, if you try to install it, it will error saying it does not support .NET 4.51.
There is also the NuGet package SQLite-net, which works for .NET Windows Store apps. All you need to add is the SQLite using statement.
You will need this NuGet package as it is the managed wrapper for the SQLite, without you will not be able to properly reference the right DLL for SQLite.
Here is the link to the project information from that NuGet package. SQLite Runtime Support
Here is an article on how to use SQLite with Windows Store apps in VS2012 but it should still all apply:
SQLite and Windows Store Apps

Create an install exe file with binaries and redistributables for XNA - VS2012

I'm actually working on a game during my internship. I made it with XNA game studio and used Visual studio 2012 (used a topic on this site to install it...). Now that i'm almost done with the code, I'm looking into make an exe file which will install the game. As it may be installed on computers where XNA and .NET redistributables aren't installed, the package should install them with the game, or it'll not work.
So I'm looking for two things :
How to generate binary files for my XNA project, as I don't want all the users to read my work. I know how to do it on VS2010, but on VS2012 I just can't find where's the option to generate them.
Once I got the binaries, I want to know how to make an exe file which will install them and the redistributables. I know there's some tools to do it, but I don't know what to use.
Thanks in advance for helping me !
They have removed the installer project type from VS2012, checkout WIX. Its a bit clumsy to get started, but once you get a hang of it, its much more powerfull than VS2010 installer project
http://wixtoolset.org/

Categories

Resources