UWP project needs to be deployed before it can be started - xamarin.forms

I am using visual studio 2017, created a new xamarin forms project and tried to run the UWP project. It shows the following error:
the project needs to be deployed before it can be started. verify the project is selected to be deployed the solution configuration manager, or deploy it explicitly by clinking one of the deploy commands in the build menu.
I have looked at all online solutions and only found that you need to set the cpu to x86 and to check the deploy checkbox under the configuration manager under the solution. Both these options don't work. I still get the same error. I have also tried every cpu option including ARM.

Have you tried to uninstall the existing UWP app from the Windows Start menu > All apps? Then deploy again from VS. It did the trick for me.

Sometimes when I create an app packet for win store; Visual studio seem to get hung up building to the packet (project needs to be deployed before it can be started -error).
I solve it by creating a new app packet.

Related

Azure App Service Deployment Centre fails to deploy from GitHub repo

I had an issue where I am developing a web service in Visual Studio 2017, ASP.NET with .NET version 4.7. When publishing to Azure from Visual Studio, it published fine and ran fine, it also runs in debug with no problems.
However, when I linked up the GitHub repo to the Azure App Service and pushed the updates to GitHub, then syncing Azure and waiting for it to pick up the updates and then deploy the app using Kudu, it would sync but then give multiple syntax errors along the lines of ';' expected, '(' expected, etc when attempting to deploy, and would therefore fail.
Apparently this is due to Azure using MSBuild 14, when it should be using MSBuild 15 for my VS2017 project. I don't understand the intricacies, and can't find many references to this issue online, but the issue was resolved by adding the Microsoft.Net.Compiler NuGet package to the project and then pushing this to GitHub and syncing the repo within Azure Deployment Centre.

A deployment error in Xamarin.Forms UWP when deploying from a PC to itself

When I just installed a Visual Studio 2017 and created my Xamarin.Forms application, it ran fine on my Windows 10 PC. However, I then installed some apps from Steam (which is the only thing I can think of that could change system settings). After that, when I try to create another Xamarin.Forms project, it does not deploy well to my machine and gives the following error:
DEP6200: Bootstrapping failed. Device cannot be found.
SmartDeviceException - Deployment failed because no
device was detected. Make sure a device is connected
and powered on. [0x80131500]
Strangely enough, my first app continues to build and run fine, even if I uninstall it from Windows and then deploy it again.
What could be the issue?
I have just noticed that Visual Studio makes ARM the default architecture. Changing it to "Any CPU" brought back the option to run the app on my machine.

Unable to configure Application Insights Status Monitor on Live IIS Web App

Application Insight is working perfectly fine on local dev but giving issue on server with the Status Monitor. Following is the error:
The application is using an older version of Application Insights for
the Visual Studio Online. Remove ApplicationInsights.config and
Application Insights Nuget package references from your project and
Application Insights to your project using Visual Studio 2013 Update 3
or later.
I followed above instruction same result. Mainly I followed this article but I have also tried the following:
Make a copy of ApplicationInsights.config if you customized ApplicationInsights.config.
In Solution Explorer, right-click your project and choose Manage NuGet packages.
Select Browse.
Search for Microsoft.ApplicationInsights.Web, select it and choose Install/Update. You need version 2.2.0 (or later).
Reinstate any customizations you made to ApplicationInsights.config. Most of the changes you'll see when you compare the files are because we removed some modules and made others parameterizable.
Rebuild your solution.
It didn't work.

Visual Studio 2017 Doesn't Run Core Apps with IIS Express

I am having an issue with Visual Studio 2017 RC where when I run an MVC and/or WebAPI app using IIS Express the app never actually runs. Instead I get stuck with a page in the browser indicating it is trying to attach and from there it goes no further. If I open another tab/window in the browser and try to navigate directly to the launch URL, it just spins forever. Likewise when I run this using the dot net run command, the app launches and runs fine.
There do not seem to be any errors that I can see, just that the browser spins indefinitely without actually ever loading the page/endpoint.
Note: this occurs for most any circumstance. Newly created project in VS with no changes, known working project from previous versions, etc.
You could follow or upvote the issue: https://developercommunity.visualstudio.com/content/problem/11391/aspnet-core-iis-express-httplocalhost51733-failed.html
Looks like our workarounds meanwhile are
dotnet run
Publish to local IIS. Which is working for me.
(Untested: downgrade from core-1.1 to core-1.0)
If you aren't familiar with VS2017/asp.net:
You have, or can reveal via View Menu-->Other Toolbars :
Debug toolbar --> dropdowncombobutton saying "[green arrow>] IIS Express"
Click on the dropdown downarrow part of the button.
You should see a Run {yourprojectname} option.
This is the equivalent of dotnet run {yourprojectname} from the commandline.
You can configure the options that appear in the dropdown with
Right-click on project in solution explorer --> Properties --> Debug
I had this same issue and after digging around for a while I discovered that I had dotnet preview v1.0.0-preview2 installed under Programs Files (x86) and a non-preview version in x64. I think VS is launching the x86 (preview) version but expecting to see the full version. To fix this, I did the following.
from programs and feature uninstall every visible dotnet core. (note: for me this did not remove the x86 preview)
go to https://www.microsoft.com/net/download/core#/sdk and install BOTH x86 and x64 SDK packages
open command line and from the root directory check run: dotnet --version (at the time of writing it was 1.0.4)
fire up .net core project in VS 2017 and run.
When I did all of the above, I was able to start up the site in IIS Express from VS.

Configuring existing ASP.NET project for DNVM, DNX environment on a Mac

I have an ASP.NET Web API project created on Windows using Visual Studio. How can I set this up for use with DNX/DNVM (on a Mac)?
Switching to Git solved the source control compatibility with TFS. But I wasn't able to find references to getting a project working across both these development environments.
I'm assuming as a first step the project will have to be migrated to ASP.NET 5/vNext but wondering other problems lurk around the corner with different project members using different environments.
I get an error when I run - git:(master):dnx . kestrel
As you mentioned yes you will have to migrate any namespace changes. I have a project that is developed across both. Also changing csproj files to xproj. Support is coming for some kind of interop between the different project types but its not here yet.
For build, publish, deploy from git without relying on VS publish capabilities or MSBuild you can follow my blog post here.
Basically you use DNU to publish and then kudu to deploy.

Resources