Xamarin iOS: Cannot render iOS Storyboard in Visual Studio 2013 - ios

I cannot see the story board in Visual Studio 2013, when I open it it tells me
There was a problem rendering this document.
Also in the errors list I have the following:
The clocks on the Build Host and this Machine are out of Sync. Please make sure they are within 3 minutes (UTC) of each other.
Failed to retrieve SDK status from server Xamarin.iOS Extension.
Also the output from the MAC server log tells me:
Error sending iOS designer payload
What can be wrong here?

I was also having a similar problem where I couldn't open the story board in Visual Studio 2012 or 2013 (I didn't have any errors in my error list, just the error when displaying the designer). My setup is dev work in Windows 7 with Visual Studio 2012/2013 with a Mac acting as a Build Host. I had just updated my Xamarin version from 3.0.54 to version 3.3.47 (it had been a little while) and I had created a little prototype app a couple days ago with no problems, so I figured I had killed something with the update.
In my case, the solution was checking for updates in Xamarin Studio on the Mac, where it found several that needed updated. After installing the updates on the Mac side, I was able to display my story board in both Visual Studio 2012/2013 without issues... so I chalked it up to version mismatch issues between the Build Host and my dev environment in Windows.

Related

Visual Studio 2019 - Option: Optimize rendering for screens with different pixel densities" is grayed out, but requritements are fulfilled

I installed the final Version of Visual Studio 2019. I read that is has this new feature to work correctly on a system with different DPI screens.
The Requirements are "Windows 10, 1803" (I have 1809) and .NET Framework 4.8 (installed the current Preview).
The Option in Visual Studio 2019 is still grayed out.
I have no clue why. - Has anyone else succeeded in activating this setting?
from https://developercommunity.visualstudio.com/comments/578963/view.html
I found what caused the issue. It was a registry key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\devenv.exe]
"dpiAwareness"=dword:00000001
After I deleted it everything works as it should.
Worked on my machine.
The Registry key may have been installed when I re-installed VS2017 after VS2019 lapsed into CPUholism
The final version of .NET Framework 4.8 was released on April 18, 2019. I installed it today, and this option now works in Visual Studio 2019. Upgrade from the preview and you should be good to go: https://dotnet.microsoft.com/download
Another reason why Visual Studio has the option grayed out is that the Visual Studio is run by clicking *.sln file in an app having HIGHDPIAWARE flag set.
The flag is usually set by right clicking the app -> Compatibility -> Change high DPI settings -> Override high DPI scaling behavior. Scaling performed by Application. It will add ~ HIGHDPIAWARE string for the app path to:
Computer\HKEY_USERS\S-1-5-21-786552173-3883971264-3181160094-1001\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
The flag can be removed by UI or deleting the key by regedit.exe from the above registry path.
If you click the *.sln file in a file manager app which has the flag set, Visual Studio Optimize rendering will be disabled.
So just ensure all the parent processes of Visual Studio have the flag disabled.
https://learn.microsoft.com/en-us/visualstudio/ide/reference/general-environment-options-dialog-box?view=vs-2019
As stated in the tip dialog box, windows has a setting "Let Windows try to fix apps so they're not blurry". Turning that off and restarting Visual Studio 2019 fixed this.
Note that I have all the minimum requirements

Android designer not rendernig properly in Visual Studio Community 2017

Since its installation, the android designer is not rendering properly because of which I have problems designing the UI. This is the screenshot that says it all.
I have repaired the installation and also uninstalled and the reinstalled the VS2017 but still it is not showing up correctly.
Check for updates and install, I dont have that problem with VS 2017 enterprise

Storyboard message: Custom components are not being rendered because problems were detected

I have an IOS app-project developed using Xamarin for Visual Studio 2013 which I haven't opened for about a year. Now I have to make some changes to the app and after some problems compiling the project I installed all available updates for Xamarin and Visual Studio 2013, but that only made things worse so I decided to install Visual Studio 2015 and update the Mac and Xcode to the latest version.
Installing VS2015 seemed to solve all my previous problems and I can now compile the project and run it fine (in VS2015), but when I open the storyboard (there is only one in the project) I get a yellow warning bar at the top that says Custom components are not being rendered because problems were detected.
I have no idea why this message appears since I only use standard components (or maybe "components" means something else than those in the Toolbox?). Does anyone know what the reason for this message is, how can I troubleshoot and get rid of it?
I should add that I'm not an experienced IOS developer.

Visual Studio 2015 Crashing when opening old razor views

I've been trying to install VS 2015 Enterprise edition on my computer but keep running into an issue. Hunting through SO for the last 24 hours, I've already tried the devenv.exe /ResetUserData & clearing the VS cache fixes, uninstalling enterprise edition and installing professional edition (which still failed for the same reason) and then reinstalling enterprise edition. I've tried deleting the .vs folder before opening the solution, ensuring that the MVC versions in the /Views/ web.config matches the version of the sites web.config (MVC 5.2.3.0).
As of this morning, I've noticed that it only crashes when I try to open a razor view that wasn't created through Visual Studio 2015 (I was using VS 2012 previously, and I'm trying to work on this project in 2015 now that I have a license). I can right-click in the solution explorer to create a brand new view and write anything I want in it with intellisense and save it, and open it back up without any issues.
I get the whole "An exception has occurred, this may be caused by an extension" message and then visual studio restarts if I try to open up a view that was already created through VS 2012.
I've tried looking inside of the log that it provides but I'm a newer developer so I can't really deduce anything from it..I'll attach it if anyone else can make anything of it.
MS VS Enterprise 2015 - Version 14.0.25029.00 Update 2 RC - .NET Framework Version 4.6.01055
I just cleared out the ActivityLog.XML and forced the error to get a fresh set of details - http://pastebin.com/j7RbGJFP
I found the answer in this blog post - https://blogs.msdn.microsoft.com/webdev/2016/01/12/visual-studio-keeps-showing-suggested-extensions/. It has to do with the extensions suggestion - it turns out if you have files not included in your project, you can't view them because of a bug introduced through the extensions suggestion. If you turn that off and include the views in the project, VS won't crash and you'll have intellisense.

How can I get started with Xamarin from Visual Studio 2013?

I want to port a Compact Framework/Windows CE app to Xamarin to create Android and IOS (and possibly Windows Phone) "versions." I reckon I need Windows 8 for Windows Phone (8) but for now I thought I could get started with Android and IOS in moving this prehistoric app into the 21st century.
According to this article, I first need "Project linker" and can NuGet it, but searching for it via Tools > Extensions and Updates in VS 2013 returns no search results.
That article says you need VS 2012 or better; the direct link to "Project Linker," though, says it supports VS 2010.
Where do I go from here?
UPDATE
I went here, and am in the processing of downloading.
UPDATE 2
Here, it says, "Modern Integrated Development Environment (IDE) – Xamarin uses Xamarin Studio on Mac OS X, and also Xamarin Studio or Visual Studio 2010 on Windows."
Yet in VS 2013, I do have project types now for Android and IOS*, so I reckon that's just a typo (hasn't been updated)?
although I don't have a Mac, so that is not possible for me right now; also, since I'm still on Windows 7 at work, Windows 8 Phone apps are not yet a possibility, either. So at present, Xamarin within Visual Studio is simply a replacement for Eclipse/Java in the creation of Android apps.
UPDATE 3
I've been waiting for something better than PhoneGap, and I think maybe I've found it. If MS were to buy this company and bake Xamarin into Visual Studio -- voila!/yowza/wow! The cats in Cupertino will have to reach for the Pepto-Bismol!
That's a bit outdated and there's a much better approach available today.
You can use Portable Class Libraries (PCL) to share code across project spanning iOS, Android, Windows (Phones) and even OSX.
See this article (and where it leads) for more details.
I certainly agree with #poupou that PCL's are the way to go (if possible). I would recommend James Montemagno's app on github. He just created this for channel9 using VS 2013. I just created a cross-platform app based off of this and it worked out well. I would only use the file-linking for the platform specific implementations with compiler directives. This can be seen in his ServiceRegistrar class in said app.
This SO answer actually explains how to get the 2012 Project Linker to work with 2013 if you still want to go that route and gives a link to the extension.
Also, you may want to check out MvvmCross. It is open-source, has a large user-base and following, and really helps with maximum code re-use. Best part, it uses PCLs and all of it's features (plugins) are available via nuget.
I would recommend reading the article #poupou posted, watching James' channel9 videos on his github page, and (if you want to check out mvvmcross) watch #slodge's N+1 videos on mvvmcross.

Resources