I'm using Visual Studio 2015 Update 3 and Xamarin 4.2.1.62 (the latest stable). The issue I have is that when editing a Xamarin Forms file (.xaml), I don't get IntelliSense for all elements' attributes. For example, with StackLayout, I get suggestion for Orientation, but not for HorizontalOptions or BackgroundColor (although both are definitely valid attributes):
I've tried all the different suggestions from this question: Cannot get Xamarin Xaml Intellisense working in VS 2015, but no luck:
The suggested extension is no longer available.
I don't use ReSharper.
When I try to open the XAML file by right clicking -> Open with... and selecting XAML Designer, I get an error saying "The file cannot be opened with the selected editor. Please choose another editor."
Is there some way to get the IntelliSense working for all attributes? Or is this normal currently?
I have also faced the same issue recently, which I resolved following these steps:
Update to latest stable version of Xamarin from Tools>>Options>>Xamarin>>Other and check now, download and install latest update.
Right click on solution explorer and click on Manage NuGet Packages For solution. select all the projects which are in your solution and update the version of Xamarin.Forms in all projects.
Now go to your PCL project and add a single new XAML page, you can check that Intellisense will now work, but only on that page.
Now Close the solution and restart the system, re-open your project, and your problem shoudl now be solved.
Related
Does anyone else have this issue? There does not seem to be a way to edit the Solution Explorer toolbar. One of the icons for Solution Explorer is missing in my C# projects.
I am using Version 16.10.3.
I managed to add this icon to the wrong place, but maybe you can find the right place and update this answer.
I did this by customizing menus:
Clicking Tools | Customize...
Selecting Commands tab
Clicking Add Command...
Selecting View
Selecting View Code, and then OK
It looks like what you have to do is find the right place to add it in the first place.
The options under Commands are Menu bar, Toolbar, and Context menu, none of which seems to fit. I looked around briefly; maybe you can do a more in depth search to find the right spot.
I have several extensions installed. One of these modifies the Solution Explorer behavior for dynamic nodes. It's possible that extension or another is interfering with this icon. Try also disabling your extensions and see if that has an effect.
Folks, I figured out the issue. When you create a .NET Core 5.0 project the VS environment is setup different. I deleted the .NET 5.0 project and recreated as a .NET Standard one with the same name and the icon showed up again.
In fact, the Studio 'solution' version is different although your using the exact same VS application. Problem solved for now.
I just re-installed windows, got visual studio back on it, cloned it from my github repo. And all of a sudden I can't see my preview design screen anymore. Tried a bunch of things already.
I got the lates jdk,
got the latest xamarin nuget packages.
Restarted VS,
rebuild/ clean solution
Got into my tools > options > xamarin, did see the option for splitview, but no matter what. it didnt bring it. I can't even see the 3 buttons for preview, split vertical and split horizontal.
Screenshot of visual studio window where the buttons are missing
if anyone knows the solutions i would be very happy to know, makes the desigining way easier instead of always building the project to see the change, even with hot reload on
After set the settings in Tools > Options > Xamarin > Xamarin.Forms XAML Previewer dialog, you need to restart the Visual Studio.
If it still does not work when you create a new project, you could right click the content page, select the View Designer. It was able to open the previewer.
Updated:
The XAML Previewer has been deprecated in Visual Studio 2019 version 16.8 and Visual Studio for Mac version 8.8, and replaced by the XAML Hot Reload feature in Visual Studio 2019 version 16.9 and Visual Studio for Mac version 8.9.
For now, I use the Hot Reload insead and provide a live visual tree to receive a real-time view of your running XAML code. It shows a tree view of the UI elements of your running Xamarin.Forms application.
When you debug you project, by default, it appears on the IDE's left. If you don't see it, use Debug > Windows > Live Visual Tree to show it.
you can choice Tools > Options > XAML Designer > General > Default document view > Split View in Visual Studio 19.9 or later.
Whenever I open an existing UiTest project in Xamarin Studio almost all of the menu options become grayed out (not clickable). And the only way to fix it, is to uninstall and reinstall Xamarin.
If I only create New projects, this problem doesnt happen. Has anyone experienced this? What can i do?
Maybe, that existing project was out-of-date and is not using the same format as your new Xamarin Studio. It could be that someone create that project along time ago, and you recently update your Xamarin Studio. Therefore, the format of that existing project is not quite compatible with the new Xamarin Studio.
I have seen some similar issues. For example, when I open my existing game project in Xamarin Studio Community, and select the button "Project" on the top menu bar, I can see that the button "Project Options" is gray out. I ask people at Xamarin and no one can explain why.
Design View for Xaml on Visual Studio Professional RC 2012 used to work for me. But suddenly stopped for no reason I can figure.
Visual Studio 11 No longer Recognizes Xaml Files.
In properties, it treats XAML files like XML.
In solution Explorer it recognizes it as a xaml file
Right Click -> Design View opens a new Xaml code page
Controls Toolbox shows nothing
My OS is Windows 7 x64.
I have applied all updates up to July 2012 to VS11
I have tried Repairing Visual Studio & Resetting Settings but to no avail.
There is nothing in search or stackoverflow I could find to remedy this.
I have not tried un/reinstalling
Visual Studio 2012 RC designer does not recognize xaml for a Windows Metro app looks identical to my case but my problem suggests the issue is more general than his title.
Reinstalling fixed his issue but does not shed light on this frustrating problem.
Can someone help?
EDIT - Reinstalling nearly resolved the issue. Design view works, toolbox is populated, auto complete is back, XAML is available under tool-> options->text... and control element properties can be viewed.
Everything is normal except for the passing strange fact that XAML Code View no longer does syntax highlighting. This is not suprising since unlike what http://msdn.microsoft.com/en-us/library/bb907395(v=vs.90).aspx expects, there are no XAML prefixed items in the displayed items.
Perhaps relatively minor in the scheme of things but also a very annoying loss.
Suggestion 4 in this link worked for me:
devenv /resetuserdata in Command Prompt.
So at least in my case, re-installing and then the above command cleared all issues. It is possible that resetting user data could have made it unnecessary to re-install but I can't know that now.
I still can't say what caused this but it seems a pretty long tail issue that occurs sporadically and looks to have precursors in older versions.
Check the following:
Tools -> Options
Expand Text Editor -> XAML -> Miscellaneous
Make sure that "Always open documents in full XAML view" is not checked
Or perhaps the default program for opening .xaml files has changed:
Right-click your .xaml file in Solution Explorer
Click Open With...
Select XAML UI Designer
Click Set as Default button
Click OK
EDIT
This does appear to be a known bug with an earlier version of VS11.
If anybody is interested. I had the failure: Could not open XAML and config files in Visual Studio 2012. Now I detected the cause: the Solutions suo files were corrupted after a System Crash. So I (was not sure) rebuilt the sln file in a different Folder and copied the sln and suo files (they are hidden!) to the old Folder. That definitely brought me back the lost functionality. Maybe it is only necessary to delete the old suo files.
Juergen
I had the same issue in Vs 2012 express edition. Solved by running vs2012 command prompt and executing the code
WDExpress/ResetSettings
In Visual Studio 2013 I had a similar issue - I change my build action & from BundleResource to AndroidResource and I was able to get it working.
I downloaded my working last repo from github, and then I opened it to check it worked, which it did. I replaced the xaml, and cs files and it still didn't work. So I just copied all the files in the root,
App.config
App.xaml
App.xaml.cs
MainWindow.Xaml
MainWindow.xaml.cs
packages.config
.csproj
.sln
Everything loaded again, thank goodness.
When I drag controls from the toolbox to an .aspx page or the designer for that page nothing shows up. I am using Visual Studio 2010 with an existing website project.
** Update
It seems to work now... I'm not sure if this was specific to one project, or a combination of things.
Is the project under source control or in a read only state?
I think the project is so messed up it just doesn't work. If I start a new project it works, so I'm going to leave it at that