Double-click this warning - visual-studio

I have just started working with Xamarin this week. I created a new "Mobile App" in Azure and downloaded from Azure a sample Xamarin Forms app. When I try opening it in Xamarin Studio, I get this message:
Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file...
There are two problems with this message. First, these warnings exist only in Xamarin Studio. The same solution opened in Visual Studio 2015 does not have this warning - and so it is not possible for me to "double-click" it in Visual Studio.
Second, the full text of this Xamarin Studio warning is virtually inaccessible because there is no way to copy it. What portion of the warning you see above, I had to transcribe. The rest of the warning is VERY long, and Xamarin Studio is acting as if it expects me to copy it somehow. But the only way to copy it...is again to spend twenty or thirty minutes transcribing it. Certainly I must be misunderstanding how to use Xamarin Studio. Here is a screen shot:
Is there a Xamarin Studio keyboard shortcut or trick that would allow me to capture this warning? And is it normal for Xamarin Studio to request problems to be fixed through Visual Studio? Why does the warning not exist in Visual Studio?
This solution also doesn't build in Visual Studio 2015. I don't get any warnings (unfortunately?), and in fact I don't appear to have any build errors either. However, when it attempts to deploy (Windows phone emulation) it gives me a variety of errors. Most of them are of this variety:
The name 'X' does not exist in the current context.
I'm baffled by this, because the symbols it names are indeed missing. So why does it build successfully?

This is not a problem in visual studio or xamarin studio.
If the device on which you are trying to deploy the build,already has an apk file installed(not from your work station), you will get this issue.
To resolve this uninstall it from the device and also from the package manager and then try to deploy the build.
I hope it will help.

Related

Debugging Cordova App (android) with Visual Studio 2015 New Emulator

I am not sure if this is me doing something stupid or just up against the bleeding edge..
I am developing a simple Cordova app but that is academic since I can repeat this issue with the standard 'Wizzard produced' default application.
I had the app working and debugging fine with VS2013 using both Ripple and occasionally with a real device.
I don't have permanent access to the device so I thought Id try the new VS2015 CTP5 with emulator. So far so good. All builds ok and the app does get deployed to the emulator, and starts. However, VS is stuck in the 'deploying' process and never comes out. To the extent that I have to 'ctrl-Break' out of it. and the debugger never starts.. The last few lines of the build output are:
2> Built the following apk(s):
2> C:\Users\Brett\Documents\VisualStudioCordova\Projects\mblapp\mblapp\bld\Debug\platforms\android\ant-build\CordovaApp-debug.apk
2> Using apk: `C:\Users\Brett\Documents\VisualStudioCordova\Projects\mblapp\mblapp\bld\Debug\platforms`\android\ant-build\CordovaApp-debug.apk
2> Installing app on device...
2> Launching application...
2> LAUNCH SUCCESS
2> Command finished with error code 0: `C:\Users\Brett\Documents\VisualStudioCordova\Projects\mblapp\mblapp\bld\Debug\platforms`\android\cordova\run.bat --nobuild,--target=169.254.138.177:5555,--debug
2>
So there is an error there but I really don't get what it means..
Ok, So I went back to VS2013 but now the 2015 install has changed something and using Ripple it now breaks out of the code at unexpected places in the code.. not breakpoints.. and the javascript console says 'Paused at breakpoint' in its dropdown. I cant access the 2015 Emulator directly, but out of interest I left the emulator running after 2015 was closed and CAN connect AND debug using VS 2013.. great.. but its not a great way to start debugging..
I really like the look of the new Emulator and it does seem to work great with 2013.. so does anyone out there know how to make VS2013 deploy to the new emulator? .. I tried running it and did have some success. But I cant find where VS2015 has hidden its VHD file..
Or, does anyone know why VS2015 might not be deploying correctly.. Im happy to go with a solution that works.. Just that right now Im stuck not going forward, and its an uninstall 2015 and probable reinstall 2013 to go back...
Many thanks.
OK.. Ive posted this as an answer because it does deal with part of it.. and I did struggle a bit so it might help someone else.
Running the emulator from VS2013.
You need to go to the folder
C:\Program Files (x86)\Microsoft Visual Studio Emulator for Android\1.0
where the emulator is installed. Having run it at least once from VS2015, it had created a file called vsemu.vhd and vsemu.sdcard.vhd. Copy both these files to something similar in the same folder I used 'myemu'.
Then to start the emulator I created a simple shortcut with the target property:
"C:\Program Files (x86)\Microsoft Visual Studio Emulator for
Android\1.0\XDE.exe" /vhd bretts.vhd /video 1080x1920
this sets the resolution too.. You can find all the startup flags etc by using:
...XDE /?
Im not sure yet, but I think it stored the various app shortcuts in the sdcard file.. although I wouldn't swear to it. Ill repost if something changes there.
Ok Debugging.. I started VS2013 and set the debug target as 'Device'. This worked fine.. so far.
Id still love to know why 2015 is not deploying properly though, for now I'll just assume its the 'bleeding' part of the bleeding edge.
Cheers
There is a known issue in Visual Studio 2015 CTP5 with Cordova projects deploying to the Visual Studio Emulator for Android. The issue will be resolved in the next release.
In the meantime, here are a few workarounds to try:
Search your machine for Microsoft.VisualStudio.MultiDeviceHybridApps.dll. There will be two copies--one under "Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Emulator for Android\" (the VS Emulator version of the dll) and one in another folder under "Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\" (the folder name varies, but it is always some random hash; this is the Cordova version of the dll). Close out of VS2015 and replace the Microsoft.VisualStudio.MultiDeviceHybridApps.dll in the Emulator for Android folder with the one in the Cordova folder (delete the Emulator one, copy the Cordova one, and paste it in the Emulator folder). Then go to "C:\Users\your username\AppData\Local\Microsoft\VisualStudio\14.0\Extensions" and delete the contents of this folder.
Create a new Visual C++ Native-Activity Application (File > New > Project, under Installed\Templates\Visual C++\Cross Platform\Native-Activity Application (Android)) and run it, then return to your Cordova project.
Reinstall CTP5 and the Visual Studio Emulator for Android and reinstall.
Hope this helps!
Another workaround for webkit developers (Android and iOS), the Chrome remote debugger, check out here.
With this you can debug as you would do normally, this does work with the emulators of vs2015 ctp5!

Windows App Studio App customizing in VS 2013 getting started

So basically I just opened the app source download from the app studio app builder site and there are a ton of errors, I bet it's simple to fix.
I just don't know what the first step are in term of fixing this. These errors are not helpful.
Can someone explain what steps I should take to getting my app studio app to build through Visual Studio 2013?
I think you should fix it by these steps:
check if all the projects in your solution loaded.
check the references in your project, normal, warning? and check the version of references.
check other errors.

set property 'system.windows.resourcedictionary.deferrablecontent' threw an exception

I'm running Visual Studio 2012, when I add a new File/Reference to a project the message box appears showing the error message
set property 'system.windows.resourcedictionary.deferrablecontent' threw an exception
I read an MSDN article suggesting to run the command devenv /resetuserdata on visual studio command prompt to resolve this problem, tried it but didn't work for me. In fact the command prompt shows the Unknown Error message.
Some addins cause this issue for me so have had to workaround it whenever it occurs:
In Vis studio -
Tools > Options > Environment > Add-in Security, uncheck 'Allow Add-in components to load', OK
Restart vis studio
The error shouldn't occur anymore, so go back to
Tools > Options > Environment > Add-in Security and re-check Allow Add-in components to load, OK
To be specific, I get this error when trying to add files to projects and manage Nuget Packages.
Update
I now make a point of opening
'Tools > Nuget package manager > Manage nuget packages for solution'
whenever I open up a new instance of Vis studio, before loading a solution, just to make sure the window loads properly
That way I know I won't get this issue.
In my case it was a style with the same key defined twice in a ResourceDictionary (WPF)
I have Windows azure tools for Microsoft VisulStudio 2013- v2.2 and Windows azure tools for Microsoft lightswitch VisulStudio 2013- v2.2.
I uninstall only Windows azure tools for microsoft lightswitch vs 2013 .
It's working fine...
I fixed it. The resolution was to remove the Windows Azure Tools for Visual Studio 2012 which I was not actually using, and the error went straight away.
In my case it was to first launch Visual Studio in safe mode. You can create a shortcut for visual studio with a target like this:
'"F:\Program Files\Visual Studio\VS2013\Common7\IDE\devenv.exe" -safemode'
Once launched in safe mode, you can remove the problematic extension via the Addin Manager. However, this wont work for some extensions, as the uninstall option might be disabled for certain extensions when running in safe mode, particularly if you have already uninstalled another extension in the same session.
In My case the problem was caused by Paradox Game engine, in which I had uninstalled it via 'Programs and Features' - which in return did not remove the extension which was originally installed via Nuget package. Uninstalling Paradox via "Programs And Features" left the extension itself still registered in Visual Studio, presumably causing a hidden NullReferenceException.
This issue can be caused by any extension that may have an error in it, or by extensions that were not properly uninstalled.
Also, see this article...
The mentioned issue can be resolved by simply restart the Visual Studio. :P
Also seem to be able to get around this by closing the project and vis studio instance, re-opening, then when the start page/open project screen appears selecting Tools > Extensions and Updates..., then pressing Close
Now open the project and the error doesn't get thrown when trying add files or manage nuget packages, weird.
Just annoying you have to remember to open Extensions and Updates each time...
Other wise make sure given Resourcedictionary.xaml path is correct or not
I had to remove Xamarin from Add/Remove Programs in Control panel and restart Visual studio to fix this.
I had this problem with My Devexpress Project in VS 2015
What finally worked for me was.
Close my solution,
Close Visual Studio,
Open Visual Studio,
Create a New dummy project,
Add a form to it,
Close and save the new project,
Reopen original project and all was ok.
for everyone else who are working in silverlight sdk environment with windows phone8 sdk.
The versions of sliverlight which are compatible with visual studio versions -
vs2012- sliverlight sdk 4
vs2013- silverlight sdk 5
I was integrating in vs2013 and as soon as I updated it with silverlight sdk 5, The errors went away.
In my case it was the Line Endings: you can have different formatting and by copy pasting some code one file got a different Line Ending. It was enough to File > Save As and then click the little arrow next to the save button.
Then click on save with encoding and choose the one you are using in all other files.
See Andrew Truckle's answer.
I hope this helps

Visual Studio : Language Service Error

I'm trying to compile a project I have in Visual Studio 2010. It has built fine on 2 other computers with Visual Studio, but on this computer, it will not compile, and returns:
"The property could not be read/written because the language service returned an unknown error"
Obviously, I have tried googling, and nothing of any use came up, so some help would be great.
Additional Information:
Project is an XNA 4.0 Project
Trying to deploy the solution to a Windows phone. The phone is plugged in, unlocked, etc. and other projects will deploy successfully to it.
I've run into the exact same error message when I tried editing the AssemblyInfo.cs using VS 2010's Assembly Information dialog from within the project properties (open Properties -> Application from below the given project).
As this thread suggests, I deleted the AssemblyInfo.cs file and filled in the values I wanted in the dialog box which created a new and working AssemblyInfo.cs. Maybe this would help/would have helped in your scenario as well.
Note, that you'll get a fresh and valid GUID if you simply click save after opening the dialog.
I encountered this today in VS 2017. It went away as soon as I performed a build which fetched all my references.

Visual Studio 2010 with phone tools - Any advanced/configurable settings?

In Visual Studio 2008, there was the device manager for setting up additional templates and options for the emulator. None of these options are available with Visual Studio 2010 which I understand as the features were removed.
When the Phone Tools are installed, the device target box comes back but there are no options at all.
Basically, I was just wondering where this list gets its options from and if there is any way at all to configure it?
The closest I got to was find the %LocalAppData%\microsoft\phone tools folder, but not sure this is correct as it appears to be more related to the emulator itself (e.g. if deleted, it gets recreated when you run.).
(Link to something a post that helped me years ago)
It took me a while, but it looks like I have found it.
I was on to the correct path with %LocalAppData%\microsoft\phone tools. All the targets are in the conman_ds_platform.xslt file.
I have no idea why they no longer provide an interface for customising - but it looks to me that despite MS taking the feature out of Visual Studio, it is still possible to customise this and add your own devices just fine.
... Next, depending on time, I will try to convert the Windows Mobile/CE project templates to VS 2010 and see if it is possible to do full development on Visual Studio 2010.

Resources