I am using Xamarin's Visual Studio pluggin. I have a Xamarin iOS Library project and it needs to use System.Net.Http in order to compile. However, I cannot seem to add it as a reference. I have updated my Xamarin Studio to the Alpha version, but still cannot see System.Net.Http in the Assemblies list when attempting to Add Reference.
Any help here would be GREATLY appreciated as I am inches away from getting this thing implemented, but am stuck on this one reference.
Is this available in Visual Studio (with Xamarin Pluggin installed), or is it only in Xamarin Studio?
Thanks in advance for your help !!
WOW !! What a work around.
Ok, here's the solution. Looks like the Visual Studio pluggin does NOT get updated when you update Xamarin Studio on your windows box. HOWEVER, when you go to your mac build server and update Xamarin to the Alpha version, then open a Xamarin Project in Visual Studio, it will prompt you that the build server and Pluggin are different versions and will allow you to upgrade. When you upgrade, after closing visual studio, then open visual studio again, VOILA!!! The System.Net.Http reference is now available under Assemblies when adding a reference.
So, the solution is to update your MAC Xamarin Studio to the Alpha version and then Visual Studio will prompt you for an update. Update it and you're golden !!
Seems like there should be an easier way, but this one worked.
i think you cant add The System.Net.Http reference.you should try this RestSharp
A simple REST client for consuming HTTP APIs..
RestSharp makes it easy to consume the wide array of services on the web over HTTP, like: Amazon, Facebook, or even Twitter...
http://components.xamarin.com/view/restsharp
Related
I am a fairly new to developing applications on Mac OS. I am using Visual Studio for Mac 2022 - Preview. I am all up to date and have created a ASP.NET MVC Web Application using .NET 6. I have started the debugger using the generated project. I make a change to the Index.cshtml file but that change fails to be reflected in the browser after saving the file. Any ideas if Hot Reload works in Visual Studio for Mac? I dont see any button to toggle the Hot Reload as all screenshots i have seen are for Windows Visual Studio. Any help would be appreciated as stopping and starting the debugger each time a change is made is very inconvenient. Thanks.
EDIT:
I have installed the Nuget Package
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
And then updated my Program.cs file as follows:
// Add services to the container.
builder.Services.AddControllersWithViews().AddRazorRuntimeCompilation();
My changes to .cshtml files still do not want to recompile after saving.
Any more help would be appreciated.
Visual Studio for Mac
Version: 17.0 Preview (17.0 build 5186)
Created a new Web Application (Model-View-Controller) project.
I got it to work on the latest preview version of Visual Studio 2022 for Mac. You will need to add the NuGet package, and also add the service to your builder in the program.cs file as an extra service:
builder.services.AddRazorPages().AddRazorRuntimecompilation();
https://learn.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?view=aspnetcore-6.0&tabs=visual-studio#enable-runtime-compilation-for-all-environments
I don't know of any way to do it within Visual Studio, but if you navigate to the folder with your .csproj in Terminal, you can type
dotnet watch
and it will load your app. Then you can make changes within Visual Studio, save, and the browser will automatically reload. The only problem is since it's running from the command line, it won't hit breakpoints in your program (I don't know of any way to do so anyway).
As mentioned above, adding builder.Services.AddRazorPages().AddRazorRuntimeCompilation() works well, the only thing that you have to reload the page manually though, while your project is running.
I just found a Xamarin Studio without Android package and Visual Studio is no option because it takes loads of disk space and is unnecessarily bloated.
Thanks a lot in advance!
I just have version 6.1.2(build 44) of Xamarin studio like the following screenshot, if you need it, you can download it with this link
As well as Visual Studio 2013 extention Xamarin is missing.
Do need to track these down and install manually? I've been trying but I'm a bit lost!
Thanks.
UPDATE: I found Xamarin Studio in the Program Files. A search did not bring it up. It seems to be working fine.
I am glad you found it, also you may want to take a look at the Add/Remove Programs and there you will see both Xamarin.Android and Xamarin Studio. Xamarin.iOS can install but will not run without a Mac machine in the network it can connect to to build.
Good luck with Xamarin - it is the most exciting thing currently in cross platform mobile technology.
I just installed Visual Studio 2013 Ultimate trial version for completing the MVC5 tutorial by Rick Anderson, which worht doing it.
The tutorial: http://www.asp.net/mvc/tutorials/mvc-5/introduction/getting-started.
However, I created a blank solution first and then try to add an ASP.Net Application project, which is going to be my MVC5 tutorial project. And I got this weird message:
Error: this template attempted to load component assembly
'Microsoft.VisualStudio.Web.Project, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'. For more information on this problem
and how to enable this template, please see documentation on
Customizing Project Templates.
But I´m not customizing, I´m just creating a project out of a built in template.
Do you know how can I solve it?
Here is the solution:
In Visual Studio 2013, select Tools > Extensions and Updates
Check for updates. You should have the Azure SDK update available.
Download and install the Azure SDK. After this, everything should work fine.
If your updates are not turned on, enable your auto detection of updates in Tools > Options > Environment > Extensions.
If you have unspecified error related to E_fail(code), try this:
When creating a new MVC 5 application, change the framework version from 4.5.1 to 4.5, if that did not work change it to 4. Check the below image if it is not clear.
Another approach:
This is really important if you are installing Visual Studio 2013 on un-updated Windows 7.
there reason i am calling out "not updated is",
The reason that 'un-updated' matters is because Visual studio 2013 does not update the powershell that is required by VS2013 for most of the stuff.
The simple solution is to update Powershell to the latest version.
If you are not sure how to update powershell, you can use this tutorial.
So I stumbled upon this issue as well and would like to share how I was able to resolve this problem.
Tools -> Extensions and Updates -> Online -> NGet Package Manager: Click the download button once you have the NGet Package Manager selected. Make sure to restart your Visual Studio after you have downloaded the Manager.
This should do the trick
Close Visual Studio, run the VS executable with the command line option as shown below (you will likely have to supply the full path), and relaunch VS normally. This should re-initialize the templates, including the one that you are having problems with.
devenv.exe /installvstemplates
So I faced the same problem with Visual Studio 2013, and I don't know what's the problem but it appears that it only occurs when creating a new project, and choosing "Web" from the panel.
What I did was simply clicking on "Visual Studio 2012" just below it, and it worked !
I've installed Mono For Android Trial on my computer And I want to use with Visual Studio.
But there is a visual design for it or only I must write every thing ?
Thankyou for information
Piercarlo
No there is no visual designer included. You can however use the Android Development Tools (ADT) Plugin for Eclipse which includes a Forms Designer to design your forms (granted you do need to install Eclipse for that) - the resulting XML you can just copy and paste into your monodroid project.
Xamarin: As of Mono for Android 4.2 we now include an integrated UI Designer for creating Android layout resources in either MonoDevelop or Visual Studio.