Visual Studio 2019 - Cannot publish a website to a local folder - visual-studio-2019

Dears,
I am using vs2019 enterprise version 16.11.2 and I am facing an issue while publishing a website to a local folder, I am getting index was outside the bounds of the array.
I tried to publish multiple website but with no hope.
it was working before but suddenly it doesn't publish anymore.
Thanks in advance

Related

IIS Express does not restart in Visual Studio 2019

In general, there is a website(ASP .NET MVC 5) that I run in Visual Studio.
The first time everything starts clearly, and if you restart the debug session, then the second time it does not start. If you look at the tray, then IIS Express is absent there.
Only restarting Visual Studio solves the problem, but again, only 1 time and you have to restart the studio each time.
What could be the problem?
This happened exactly to me when I upgrade a solution from VS 2010 to VS 2017.
I searched for solutions and only found: remove the .vs directory from the solution, remove the IIS Express directory from the documents or reinstall VS.
The problem was that the solution has multiple web projects that can run. And in one of them, in the .csproj, there was this configuration:
<UseIISExpress>false</UseIISExpress>
<UseIIS>False</UseIIS>
When I set it to true, the problem was gone.
Regards.

Runtime error when deploying to Azure because of one dll file

I build the app using Visual Studio and already publish it to Azure Services.
However, when trying to run it, I got the following error:
Could not load file or assembly 'RandomColorGenerator.Forms' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I looked into the bin folder in my local project and I can see the dll file just right.
Any suggestions?
According to your description, your MVC project could work on your development environment, but when deployed to Azure Web App, you got the above error. Per my understanding, you could follow the possible approaches below to troubleshoot this issue:
Use KUDU which is an analysis tool for Azure Web Apps, click on the "Debug console > CMD", then check your deployed web content under D:\home\site\wwwroot\. Make sure the missing dll has been deployed to Azure Web App successfully.
You could try to create a new web app for deploying your MVC project, in order to isolate this issue.
Additionally, you could try to empty your deployed web content via KUDU or redeploy your project by select "Delete all existing files prior to publish" under the "Setting > File Publish Options" of VS publish wizard.
UPDATE:
Based on your comment, you are using Azure Cloud Services. You could enable Remote Desktop and re-publish your application, then remote to your cloud services for troubleshooting this issue. Here is a similar issue, you could refer to it.
An attempt was made to load a program with an incorrect format.
As I known, the above message means that there be a 32-bit or 64-bit
platform conflict. For more details, you could refer to this similar issue.

IIS Express will not start when running copy of project on different computer

I have created a brand new ASP.NET MVC 5 project in VS2015 Enterprise (update 3). It runs as expected on that machine. However, when I copy/paste the whole project to a different machine running VS2015 community edition (update 3), the site fails to load and I get the error message:
The program '[1648] iisexpress.exe has exited with code 0 (0x0).
Here's the kicker - Creating a new ASP.NET MVC 5 project in VS community edition and copy/pasting and running it in VS2015 enterprise in the same way, however, works normally without any configuration changes. I have recreated the files in the users\documents\IISExpress folder as pointed out by other SO questions, tried changing ports, but to no avail.
EDIT: IIS immediately fails on launching, by the way. It sounds like a config issue, but I'm not sure what to check in this case.
I got the same issue, what i did is just close all the visual studio instances and in your project folder clear the .vs file(mostly it's Hidden). after that open your project.

Slowcheeta not working for web applications in Teambuild

I read this article on getting slowcheeta working on the build server. It works fine with Console apps but I can not get it to work for Web Applications.
I verified that the build service can access the slowcheeta (works fine for consoles apps).
I am able to transform on my local machine for web applications correctly as well.
The primary .config file is set to content do not copy, the transforms are set to none, do not copy.
The server is TFS 2012 with visual studio 2010 and 2012 installed to support build tasks.
github

Debugging deployed azure app

Is it possible to attach to a deployed Azure app? I would like to be able to step through the code so that I can see what values are being set in a request to one of my web role actions.
I have looked around and the only examples seem to be of debugging when the azure app is running on the local machine.
Windows Azure Tools (June 2010) allows to use IntelliTrace in the cloud. This release:
Adds support for debugging services in the cloud by using the Visual Studio 2010 IntelliTrace feature. This is enabled by using the deployment feature, and logs are retrieved through Server Explorer.
IntelliTrace support requires:
.NET 4
Visual Studio 2010 Ultimate
the cloud service has to be deployed with IntelliTrace enabled
No, you can't debug an Azure app running on MS's servers.
You might be able to solve your problem with Azure's logging feature, though.
Edited to add MS just announced IntelliTrace for the cloud fabric in the June 2010 tools.
Adding one more thing to Rinat's answer: I did attend a session on Intellitrace and one of things I was told that it should never be used on your applications running in production slot as it creates quite an overhead. So you may want to deploy your application in staging slot do all the cloud debugging and then remove Intellitrace once you find the cause of your problems.
Craig is right "today" you cannot debug an Azure App running on cloud fbaric, you can only debug on local fabric.
you may want to look at the diagonostic and logging API
Link
http://blog.benday.com/archive/2008/11/07/23201.aspx
this is a great tool - http://www.cerebrata.com/Products/AzureDiagnosticsManager/Default.aspx
http://msdn.microsoft.com/en-us/magazine/ee336122.aspx
This will help u..
There is a way to deploy the Visual Studio 2012 remote debugging tools to a Windows Azure Cloud Service and attach to the remote process. The following BLOG post explains an approach.
http://www.fullscale180.com/Blog/post/2012/10/07/Remote-Debugging-Windows-Azure-Cloud-Services-with-Visual-Studio-2012.aspx
This sample code
demonstrates remotely debugging Windows Azure Cloud Services with Visual Studio 2012. The sample utilizes Visual Studio 2012 remote debugging tools and provides an approach to deploy these tools with a cloud service, allowing us to attach to the deployed instance from the Visual Studio 2012 IDE using the remote debugging features.

Resources