Deploying to Azure: "Access to the path ... msshrtmi.dll is denied" - visual-studio

I have a long-standing Azure project that I built in VS2012 against the Azure SDK 2.4, and am attempting to migrate it to VS2015 and Azure 2.7. I am able to build the project and run it locally, but when I attempt to deploy it fails with the following error:
Access to the path 'C:[user folder]\AppData\Local\Temp[random chars]\roles[solution]\base\x86\msshrtmi.dll' is denied
When I attempt to view that containing folder it doesn't exist... perhaps it is removed after the publish failure? I've found the msshrtmi.dll within the solution folders, and have tried changing the platform targeting that has been claimed to help other msshrtmi.dll issues, but most of those seem to be fails at build time not publish time.
I've re-built a new Azure solution and imported my web role project and get the same result. I've never had to delve deep in to the VS configuration/build/deploy world before and am hoping someone can help point me in the right direction.
Thanks in advance for your help!

I had the same exception. My resolution was a workaround given to me by the Microsoft Azure Tools team - package or publish on a 64-bit machine. My VM was 32-bit. As soon as I packaged on the 64-bit machine, this error went away and I could publish once again.
The same team members said this issue will be fixed in the Azure 2.7.1 release around the end of August.

Related

Unable to publish to Azure: Web deployment task failed

I have been deploying my Web Service via Visual Studio for over a year. Today it suddenly started giving me the error: Web deployment task failed.
Things I have noticed:
I have two other projects in the same solution that deployed to Azure without an issue.
I am able to download and change files via Cloud Explorer in VS.
I cant preview changes.
Validate Connection fails.
Things that I have tried:
Reset the publish profile via Azure, downloaded and imported it.
Selected an existing App Service.
Ensured that WEBSITE_WEBDEPLOY_USE_SCM = false before downloading the latest
publish profile.
Manually typed in the Username, Password from the Deployment Center
Hopefully someone can see something I am missing.
I was finally able to publish after a few weeks and plenty of back-and-forths with Azure support. I'm not sure if it was just time that fixed the problem, but the last thing I did before it started working was Attach a Debugger to the App Service. Hope that helps!

Why is latest Xamarin needed on local TFS server for CI?

The requirements on the following page state that you need to install Visual Studio with Xamarin on your local TFS server to setup Xamarin CI builds:
https://developer.xamarin.com/guides/cross-platform/ci/intro_to_ci/
topography of the CI
This is a real pain. We have lots of developers that rely on our local TFS server, most of whom don't do any Xamarin development. As such, any changes are heavily scrutinized. This often leads to us not installing the latest VS/Xamarin releases, as it's considered too risky for this vital bit of infrastructure.
We could have a Windows build machine with VS and Xamarin installed, that is connected to a Mac build machine. We'd be free to update the Windows and Mac build machines regularly, without the fear of compromising the TFS server. Is this possible? If not, why not?
Thanks in advance.
That diagram can't be right. There is no reason why you'd need VS or Xamarin installed on your TFS app tier.
I think it's showing a simplified configuration where the Windows build agent is installed alongside the app tier. That is a supported setup but is never, ever recommended by anyone, for exactly the reasons why you don't want to do it.
The diagram is simplified. You don't need to install anything on your TFS server. What you do instead is to install a Build Agent on a separate machine or virtual machine.
The installation details for the TFS 2017 / VSTS build agent v2 can be found in the official visual studio documentation.
The procedure is similar for both TFS and VSTS, where you generate an access token in TFS/VSTS, then simply enter the url for the TFS/VSTS instance when running the build agent install script, along with the access token.
There are build agents for Windows, Linux and macOS, so it is up to you how you configure how iOS builds are made.

Visual Studio 2013/2015 Can't Load Azure Project

I just got a new machine, and upon installing VS2013 (and I also tried VS2015 preview), one of our projects would not open.
The application which this project type is based on was not found.
Please try this link for further information:
http://go.microsoft.com/fwlink/?LinkId=441332&projecttype=CC5FD16D-436D-48AD-A40C-5A424C6E3E79
The output windows, gives this link, which is useless, and searching online for the GUID {CC5FD16D-436D-48AD-A40C-5A424C6E3E79} didn't bring anything up.
Any ideas what this could be? I have used Web Platform Installer to install the Latest Azure SDK.
It turns out that our project is based on Azure SDK 2.4, and I had incorrectly installed Azure SDK 2.5
Hopefully the GUID {CC5FD16D-436D-48AD-A40C-5A424C6E3E79} will show up in searches, if others have this same problem.

Error debugging worker role in Azure

All the sudden started getting the following error while trying to debug a worker role:
"Windows Azure Tools for Microsoft Visual Studio
There was an error attaching the debugger to the role instance 'deployment16(360)blah blah' with Process Id: '8780'. Unable to attach. The Microsoft Visual Studio Remote Debugging Monitor has been closed on the remote machine."
Restarting Visual Studio and the machine do not help.
As you start getting this problem all of sudden in your development machine something must have changed and it is mostly due to some of the OS auto-update and/or some application update you installed in your machine. There could be any random reason for this problem however if I would have hit the exact same problem here is what I would do to troubleshoot such issue:
To start, first thing is to just check it is not an application specific problem by creating a base app from web/worker template and see if that exhibit the problem.
If you have installed new release Windows Azure SDK 1.7 check with both SDK 1.6 and 1.7 to verify if both exhibit the problem.
Check if your could debug IIS based application as well outside Compute Emulator. This will isolate if the problem is specific to Windows Azure development Fabric or bind to your IIS itself.
If this is IIS specific issue, Check IIS configuration for all enabled functionalities, try resetting Application Pool configuration, running "ASPnet_regiis -i" etc to fix the issue.
If it is Windows Azure Computer Emulator specific, I know sometime OS updates may make application unstable so in that case, I will re-install .net 4.0 and VS2010 SP1 again respectively. (This does help so many time) then re-install Azure SDK 1.7 completely.
Such random problem mostly occur due to some change in your machine configuration, so restoring the VS2010 and the re-installing all other application does help to solve problems.
If you have an exception in the role's OnStart() or in Application_Start() that the debugger doesn't pick up, you may also receive this message. Application_Start() errors are especially pernicious because the debugger doesn't attach to the web process until after this method returns.
If you are wedded to cloud specific classes such as RoleEnvironment and cannot make the web role a startup project, you can use Ctrl-F5 to run the cloud project without debugging. With some luck you'll get a yellow screen of death to show you the true error.
Avkash covers the points.
I had the same issue recently. I set my web project as start-up rather than Azure and I discovered that that web project didn't actually run. Turned out somehow when of my projects was compiling for X64. I changed that and it worked.

Azure SDK 1.4 - Cannot debug in VS2010 with multiple sites

I have a newly installed laptop running Win7/x64 and installed Visual Studio 2010, then VS2010 SP1, and then the Windows Azure SDK 1.4.
When I attempt to debug a cloud service project in the local compute emulator environment, I get an error: "The was an error attaching the debugger to the IIS worker process for URL 'http://127.0.0.1:5102/' for role instance..."
Some searching turned up quite a few discussions on this issue with the Azure SDK 1.3 update and I've narrowed down the issue to my having multiple sites in the same Web Role in my Azure application. If I comment out the sites entries in the ServiceDefinition.csdef, there's no error and debugging works fine. I tried the other recommended solutions, reinstalling .NET, re-registering ASP, rebooting while facing Redmond, but same problem.
I'm surprised by this issue on a new VS/Azure 1.4 installation and I'm hoping someone else has resolved supporting multiple sites for local debug.
Thanks!
I ran into the same problem, and have two suggestions:
If you've pointed to the "Published" output of a website and not the source location in ServiceDefinition.csdef, you'll get this error. Point to the source location of the web site when you're debugging. You can always switch the location later if you'd rather deploy a published web site rather than the source.
Ensure that you have debug set to false in the each of the web application's web.config file. While obvious, this catches me from time to time.

Resources