Visual Studio 2015 - WP8 Application could not be launched for debugging - visual-studio

I've been developing an app for Windows Phone 8 in Visual Studio 2013 without any problems. I installed Visual Studio 2015 Community and I now can't Debug the application.
The application is deployed to the phone but then I get the following error "The application could not be launched for debugging. Ensure that the target device screen is unlocked and that the application is installed."
The device screen is unlocked and the application is successfully installed but then it is not started in order to begin debugging. I've looked everywhere but can't seem to find an solution. This problem never happened neither in VS2012 nor VS2013. I still have VS2013 installed and it successfully debugs the app.
CTRL-F5 (Start without debugging works fine but I can't debug.)
And I've already made sure that in Configuration Manager the project is set to deploy.
Also, I've tried cleaning, rebuilding the solution, restarting VS2015, rebooting the pc, rebooting the phone and nothing worked.
[Edited]
If I create a WP8.1 app, the same happens with the new solution/project. If I create a W10 App, the Windows Phone Emulator works but when I try to deploy/run to local machine, it gives an error of "The system cannot find the specified file".
On top of that, when I start VS2015, I get an error and this is what I found in the ActivityLog.xml:
<record>10408</record>
<time>2015/09/01 13:41:43.306</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.IO.FileNotFoundException: Could not load file or assembly &apos;Microsoft.IntelliTrace.Package.Common.14.0.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.
File name: &apos;Microsoft.IntelliTrace.Package.Common.14.0.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos;
at Microsoft.VisualStudio.IntelliTrace.SourceControl.HistoricalModeHint.HistoricalModeTagger..ctor(IServiceProvider serviceProvider, ITextBuffer buffer, IVsEditorAdaptersFactoryService adapterFactory)
at Microsoft.VisualStudio.IntelliTrace.SourceControl.HistoricalModeHint.HistoricalModeTaggerProvider.CreateTagger[T](ITextBuffer buffer)
at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
</description>
I tried repairing the VS2015 installation but the problem persists after repair.

Related

Visual Studio IDE Error On Launch When Loading Project

I am loading my project into Visual Studio 2019 IDE. When I go into the forms designer within the IDE
Visual Studio Forms Designer has been gives me the following error:
An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch.
There is no code associated with it. All referenced DLLs haven't changed.
Has anyone else experienced this or have a work around as the Google searches I have done have given me to help. Is there a way to narrow down the error? I have also checked all the security dlls to make sure they are correct and are referenced locally to help. Maybe something to do with the CAS policy?
I have also tried on my installed versions of 2012, 2015, & 2017.
UPDATE: Updated the error above as I had the wrong error added.

How to resolve " 'IAsyncActionWithProgress<>' is defined in an assembly that is not referenced" in Windows UAP app

I am developing a Windows UAP app in Visual Studio Ultimate CTP 2015 (latest one available in site).
I am facing issues while using await on Functions returning IAsyncActionWithProgress<>, IAsyncAction<> , IAsyncOperation<> and IAsyncOperationWithProgress<>.
I am getting the following error
Error
CS0012
The type 'IAsyncActionWithProgress<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
I tried adding reference to the assembly mentioned (Windows). Even though this resolved the above error, it created another error at many other places (seems like there is a repetition of some classes/API's in both the assemblies. One of the error obtained is :
Error
CS0433
The type 'Page' exists in both 'Windows.Foundation.UniversalApiContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' and 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
Example of code
Windows.Storage.FileProperties.BasicProperties fileSize = await file.GetBasicPropertiesAsync();
This was working fine for a Windows Phone 8.1 app in Visual Studio 2013.
What is the change I have to make to get the same result in UAP App in Visual Studio 2015.
I had the same problem with the IAsyncAction and I have just managed to solve it, so I am going to share the (maybe not the best) solution.
First I tried repair VS, no success. Then reinstalling VS, again no success. So I went to control panel -> programs -> uninstall programs, and from there I uninstalled everything that had something to do with Visual Studio or .NET. It displayed me a couple of errors, like that some applications require this program to run, but i anyway uninstalled it (if I will need it I will install it again). After that I installed Visual Studio again, wrote the code which caused the error and, it worked, with no error.
Hope this helps you as it did help me.
Sounds to me like your migration from Windows 8.1 to Windows 10 didn't go through quite right. Andy Wigley has a video with instructions on how to migrate a Windows 8.1 project to Windows 10. His example is for Phone but also applies to desktop. Here's the video: http://www.microsoftvirtualacademy.com/training-courses/a-developers-guide-to-windows-10-preview. Go look at the section titled "Migrating 8.1 Apps to Windows 10".
To be clear, you shouldn't need to add any references to get those types working in a Windows 10 Universal App. A good starting point (on Andy also points out in his video) is to create a new black Windows 10 Universal App project and compare your project and package manifest files to it and just bring over the changes.
I think the issue is the following, you can deploy on the Windows Phone but when you try to access to specific functions of the Phone you need to add
Looks like changing Project -> Properties -> Library -> Min version from any version below 14393 to 14393 or above helps with the issue.

Missing System.Data.SQLite.dll reported after installation

The desktop software (.Net 4.0, compiled under Visual Studio 2010, target: x86) I'm developing is shipping with System.Data.SQLite (1.0.86 for x86, from system.data.sqlite.org*) for the first time.
On the development machine (And every other machine where the System.Data.SQLite-installer has run), everything works correctly.
On the testing machine however, after installation (a standard MSI setup created with the Visual Studio Installer) launching the application and showing the splash screen, before showing the GUI, the application creates an exception with the error:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SQLite.dll' or one of its dependencies.
The mentioned file itself is found in the application directory (correct version), along with all the other referenced DLLs.
I assume this works on the development machines because of the setup option 'Install images'. I didn't install SQLite in the GAC. The application project is directly referencing the pre-build System.Data.SQLite.dll with local copy set to true.
Are there any dependencies I'm not seeing?
Or is it a missing Microsoft Visual C++ Runtime Library (Not present in the application directory)?
Or a missing SQLite.Interop.DLL (Not present in the application directory)?
How could I fix those?
= The installer I've used: http://system.data.sqlite.org/downloads/1.0.86.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.86.0.exe
Ensure that you have the latest Microsoft Visual C++ 2010 Redistributable Package installed.
http://www.microsoft.com/en-gb/download/details.aspx?id=5555
Why? The sqlite DLL has some unmanaged code embedded in it that is run directly from the assembly at runtime. This manifested for me as a bad image format exception but you never know!

Microsoft Visual C++ 2010 weird error on startup

I'm using Visual Studio C++ 2010 and I've been using it for about 3 months now. Recently, It refused to start, giving me a "Operation could not be solved" error whenever I tried to do that. I tried reinstalling and now it's saying "Could not load file or assembly 'System, Version = 4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies . Invalid pointer (Exception from HRESULT: 0x80004003(E_POINTER))"
Please help, I'm unable to open the program at all, and I can't program anything in windows until I get this fixed. I suspect it's something in the registry but I don't really know.
suggestion to narrow down your issue
Download .NET Framework Verification Tool to verify whether .NET Framework 4 is installed correctly on your machine or not.
If it verified successfully, could you please type Devenv.exe /ResetSkipPkgs to skip loading added to VSPackages. More info about this.
Take care.

designer crash visual studio 2010 for windows phone 7

I'm having all kinds of problems getting Visual Studio 2010 to work with the Windows Phone 7 templates. All I have is a default portrait view added to the project, and the designer gives me the following error:
System.IO.FileNotFoundException
Could not load file or assembly 'Microsoft.Phone, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e' or one of its dependencies. The system cannot find the file specified.
followed by a bunch of crap that doesn't seem too helpful. If I rebuild the project and refresh the designer, it momentarily appears correctly (less than a second), and then Visual Studio crashes and tries to restart.
Anyone have any idea why this might be happening?
Well, sounds like the install didn't go well. Verify that this reference assembly is located where it is supposed to be, the default install location is c:\program files\reference assemblies\microsoft\framework\silverlight\v4.0\profile\windowsphone. Randomly retrying to reinstall might pay off but do check your machine health first, this doesn't go wrong very often. Ask questions about that at superuser.com

Resources