I am unable to build Windows Universal Apps in Visual Studio 2015. The application fails to start and shows this JIT debugger window:
There is a similair issue on StackOverflow that I cannot find but will continue to look for. One of the possible fixes was to switch to targeting 8.1 and then switch back, but I am unable to target 8.1 for any universal app.
Debugging the program reveals the following details:
Exception thrown at 0x7523DAD8 (KernelBase.dll) in APP_NAME.exe: 0x04242420 (parameters: 0x31415927, 0x558B0000, 0x004FF1D0).
Unhandled exception at 0x00007FFF60BB1F28 (KernelBase.dll) in WWAHost.exe: 0x00000004: The system cannot open the file (parameters: 0xFFFFFFFF80004005, 0x0000000000000005).
WWAHost.exe has triggered a breakpoint.
I think it has something to do with the WinMD file (specifically this line)
<Error Condition="'$(_TargetPlatformMetadataPath)' == ''" Text="Could not find an existing platform WinMD location" />
But I'm not sure how to set the _TargetPlatformMetadataPath or anything like that or where it would be set.
Here is an image as well, as you can see the application fails to load entirely and displays a big X instead of any actual content:
Here's what I've tried:
Restart and Repair Visual Studio 2015
Remove, restart, reinstall Visual Studio 2015
System restore (uninstall apps and reinstall Windows 10)
Clean & Build Remove compile directories (bin)
Create a new project
Download a project/template
Enable Windows 10 Developer Mode
There is no nuget package config file
I can build other project types without any issue, it seems to only be an issue with Universal apps. I should also note, this issue occurs if the project is brand new or if I've added content to the apps UI. The designer also fails with System.Runtime.Remoting.RemotingException or a System.Runtime.InteropServices.COMException seemingly randomly.
I have not been able to find any truly similar issues anywhere. I can select Universal App as a project type, but if I click compile it fails no matter what. I'm at my wits end here and am open to any suggestions, thanks everyone.
If nobody minds I'll post it like an answer (may be will be needed for someone else)
There was a bug in Windows 10 versions under Build 14295.
If you change default save location disk from C to another one in Settings - System - Storage - you will be not able to debug UWP apps in Visual Studio.
Upgrading system to latest should resolve the problem
Related
I'm using a fresh install of Visual Studio Community 2017 for Mac, but can't seem to get errors to display in the errors pad without running my program; on my Windows PC, design-time error checking with VS is automatic. I just updated to Mojave, but was having this issue in my previous Mac operating system.
To be clear, typing incorrect code in a simple console app file (or in a Unity project file, or in a number of other sample solutions that I tried), like string name = 23.45;, does not cause an error to be logged in the errors pad unless I run the program.
Is it possible to enable live error checking on VS for Mac, or does this feature only exist on Windows?
I've installed a fresh copy of Visual Studio 2017 Community Edition on Windows 10 Pro Fall Creators Update recently, and I'm unable to properly create a new ContentPage on Xamarin.Forms (see screenshots 1-3). At my first attempt of creating a new ContentPage in a new Xamarin.Forms project, I encountered the errors seen on screenshot 1 and 2.
Next, an automated error log was generated (as attached). If I don't create any new items and run as-is, I can successfully launch the app on my Android emulator with no issues.
Exception of type 'System.Exception' was thrown
The project system has encountered an error.
Did not find new element in the hierarchy for item "Page2.xaml". The
item would have been added with type "Page". The project item
schema service knows about this item type. The item does exist
in the project file.
A diagnostic log has been written to the following location: "C:\..." (see below link)
Automatically generated error log file - txt
The issues arise when I create a new ContentPage. The code-behind .cs file and .xaml file will not be immediately visible in the Solution Explorer. I need to manually click the Show All Files button to show the newly created files (as seen in screenshot 3). However, I couldn't include them into project despite multiple tries.
When I open a .xaml file (in this case Page2.xaml), errors mentioning missing references and assemblies are visible (see screenshot 4 below).
I've done the following thus far:
Removed mobile app development (Xamarin) in the Visual Studio
installer
Reinstalled Xamarin by including (checking) the mobile app
development (Xamarin) in the Visual Studio installer
Are there any known solutions to this issue? Any assistance is kindly appreciated. Thanks!
UPDATE (Feb 27): Attempted recommendation by Paul-Jan but the issues still persist. However, the newly created Page1.xaml was properly included and recognized by Solution Explorer (as shown below).
I've had this happen with fresh VS2017 Professional installs where Universal Windows Platform (UWP) support was not added during install. Of course you might have no desire at all to develop for UWP, but apparently there are bits and pieces of the Xamarin Forms toolchain missing when you don't install it.
Running the Visual Studio Installer again, adding UWP support, helps.
My UWP app is building,rebuilding and deploying fine but it is not running.
Although, it works fine in other system.
I am using Visual Studio professional 2015 since 5 month to build this project and all of a sudden it has started showing this.
When i try to uninstall the app it doesn't give any option to uninstall also.
I have tried restarting the system and cleaning,rebuilding the project file but nothing seems to work.
Thanks in advance.
Causes:
It is a known issue in Visual Studio 2015.
For more info: unable to activate Windows Store app
Solution:
Update to Visual Studio 2017
For other solutions:
Unable to activate windows store app the app didn't start
Unable to activate Windows Store app: The App1.exe process started, but the activation request failed with error ‘The app didn’t start’
It seems like the directory or the folder were corrupted so that is why every time when i was running the application it was installing in a non packaged version therefore i was not getting the option to uninstall it properly.
I tried by deleting the whole folder which created in AppData folder of the Users but it didn't work.
So finally i created a new folder and moved my solution over there.And everything is working pretty much fine now.I thought we could solve this problem by repairing Visual Studio but since this issue is not related with Visual Studio and moreover it takes half of your day to repair Visual Studio so only moving the project to a newly created folder would be a good idea in this case.
I cannot add a solution reference to a portable class library to my Windows Phone 8.0 apps in Visual Studio 2012. When I try to add it by browsing to the .DLL, then it works. I receive this error when I try:
I am able to add a reference to the portable class library in my web service project, so the library itself appears to be OK.
I have tried:
Restarting Visual Studio.
Restarting Windows
Creating a new Windows Phone project
Creating a new portable class library
Repairing the Windows Phone 8 SDK
Repairing Visual Studio 2012
Regardless of what combination of those things I have tried, attempting to add a solution reference to a portable class library in a Windows Phone project gives me that error.
Well, it turns out that this error message was actually completely useless in what the issue actually was.
The issue was caused by a version mismatch between the PCL and Windows Phone project. I finally realized that VS 2012 only lets you target Windows Phone 8.0
for phone apps, and not 8.1, and I was selecting Windows Phone 8.1 as one of the target frameworks in my PCL. In order to allow me to add a solution reference to the PCL, I had to add "Windows Phone Silverlight 8.0" as one of the target frameworks. Now it works fine.
I have no idea why that error message is the one that I was receiving, but hopefully this can help someone else out if they run into it.
Problem in my case
I am not able to install Microsoft.EntityFrameworkCore.Tools package.
Every time I run the command inside Package Console it shows an error like this
Error
User canceled out of save dialog (Exception from HRESULT: 0x8004000C)
Solution
Restart Visual studio 2019 in admin mode.
Please make sure your project file is not locked.
You can check it by trying to edit the project file (.csproj file). If this file is locked, you cannot add the dependencies.
Tell the person who locked the file to check in or undo the project file and then try to add the dependency
Make sure you have saved any files that you have been working on before attempting this operation. I went to restart Visual Studio and it informed me that I had some pending saves. I saved, restarted and then was able to add the project reference.
Close the Visual Studio and open in run as Administrator .Then try to install the packages.I hope this will work.
This is very odd, yesterday this project loaded fine and today it doesn't want to.
Here is the error message:
C:\Dailymotion\dailymotion-windows-universal\Libs\winsdkfb-master\FBWinSDK\FBSDK-UWP\FBSDK-UWP\FBSDK-UWP.vcxproj : error : The method or operation is not implemented.
Project 'Facebook' could not be loaded because it's missing install components. To fix this launch Visual Studio setup with the following selections:
Install Universal Windows Platform Tools
C:\Dailymotion\dailymotion-windows-universal\Libs\winsdkfb-master\FBWinSDK\FBSDK-UWP\FBSDK-UWP\FBSDK-UWP.vcxproj : error : The method or operation is not implemented.
What is crazy is that i already have "Install Universal Windows Platform Tools" installed because i am developing a Windows 10 app! anyone have any idea?
did you upgrade your UWP tools?
I'm using VS 2015 Update 1 with UWP Tools 1.2 and I'm able to build https://github.com/Microsoft/winsdkfb/tree/master/FBWinSDK/FBSDK-UWP without errors.
Thank you for reporting this issue with using Visual Studio 2015 RTM to open C++ UWP apps, and our apologies for introducing this error.
We've released a fix for this issue. While we encourage you to install Update 1, you do not need to do so to get this fix. VS will automatically download the fix
If you have an internet connection, and
Once every 24 hours upon restarting Visual Studio.
So, if you wait until 24 hours from now, you’ll get the fix. If you want to force it sooner, here’s instructions:
Close Visual Studio
Open %appdata%\Microsoft\VisualStudio\14.0\FeedCache
Copy all the files out to a new folder
Make sure you have in internet connection and restart Visual Studio
Wait a few minutes and you’ll see a new file appear in the FeedCache folder
You can copy the old files back into the folder if you want
If you can’t successfully open your project with a pre-Update 1 Visual Studio, please let us know.
Thanks!
-Paul Chapman
Visual Studio PM