Windows Azure Tools: Warning: Unable to delete directory - azure

Anyone know the solution for this? Using the latest version of Azure tools and every time I do a build I see these messages in the output window:
Windows Azure Tools: Warning: Unable to delete directory APPROOT.
Windows Azure Tools: Warning: Unable to delete directory WEBUX.
Windows Azure Tools: Warning: Unable to delete directory APPROOT.

Angela, it is very much possible that an application has open handle to these folders and build process could not delete the folder/files so it can update with new binaries. This problem is specific to your machine, not Windows Azure.
If you could not figure out which application is using, what you could do is restart your machine so you know none of any application is using and then start Visual Studio and clean/rebuild your application and see if you still see this error. If you still see the error, I can provide some other troubleshooting info to help you further.

I ran into this error too. Azure SDK 1.7 added a new way to deliver 'extra' file resources upto the roles. To fix my this error, I manually deleted the folders under the Azure project, Profile roles after exiting VS.

As Avkash mentioned, some app is using your files... a few suggestions that worked for me:
1) Prevent antiviruses from inspecting the build folders
2) Disable Windows search service
3) Disable any auto-backup or auto-sync services that look at build folders
HTH

Related

Failed to initialize Windows Azure storage emulator.Unable to start the storage emulator

Whyle starting cloud application (Azure storage emulator v 2.3) I got error:
Failed to initialize Windows Azure storage emulator
I have used this to configure sql express for this purpose and I was able to create database - WAStorageEmulatorDb32. But still got above error. Any idea? Thanks.
Edit
Here is what I get when started storage emulator with -inprocess option:
I encountered similar issues when updating to v2.5. I tried everything outlined in the various blogs and technet forums with no luck but it seems like the advice given was correct, just slightly different for my case.
Uninstall all previous version of azure sdks
Optional and probably not related to fixing my issue. I uninstalled all azure sdks, authoring tools, azure tools for VS, azure libraries for .Net, storage emulators and compute emulators.
Delete WAStorageEmulatorDb files
Next up was to clean up any previous WAStorageEmulator database files. For most users these appear to be kept in c:\users\{user}\WAStorageEmulatorDb*.*.
sqllocaldb stop v11.0
sqllocaldb delete v11.0
manually delete c:\users\{user}\WAStorageEmulatorDb*.*
sqllocaldb create v11.0
At this point reinstalling Azure SDK 2.5 via Web Platform Installer failed to install with the following error.
CAQuietExec: Windows Azure Storage Emulator 3.0.0.0 command line tool
CAQuietExec: Error: Cannot create database.
CAQuietExec: Error 0xfffffff3: Command line returned an error.
CAQuietExec: Error 0xfffffff3: CAQuietExec Failed
This is where I noticed my environment was different. Running sqllocaldb info I noticed I had 4 instances, V11.0, two instances which hosted personal databases and a 4th one called MSSQLLocalDB. If you open (localdb)\MSSQLLocalDB in Visual Studio - SQL Server Object Explorer you should should see WAStorageEmulatorDb. The problem for me was that my WAStorageEmulatorDb wasn't being stored in v11.0 as it was for other people, so deleting v11.0 didn't help.
Delete WAStorageEmulatorDb files again. So now that I knew where my WAStorageEmulatorDb was, I re-ran the following
sqllocaldb stop MSSQLLocalDB
sqllocaldb delete MSSQLLocalDB
sqllocaldb create MSSQLLocalDB
Re-install Azure SDK 2.5 via Web Platform Installer completed successfully.
Lastly, running c:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\WAStorageEmulator.exe init followed by c:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\WAStorageEmulator.exe start started successfully.
To verify you should also have new c:\users\{user}\WAStorageEmulatorDb34.* files.
I hope this helps someone who comes across this in the future.
I had a similar problem.
Refer Azure storage emulator failed to initialize for the solution.
It solved my problem.
I hope this helps you.

Failed to debug the Windows Azure Cloud Service Project. The output directory does not exist. / Azure SDK 2.3 / VS 2013

I have Azure SDK 2.3 installed on my Windows 7 machine. The target .Net framework is set to 4.0. I'm able to upgrade my solution to Azure SDK 2.3 and build with no problems. However, when I try to run the solution, I get the following error:
Failed to debug the Windows Azure Cloud Service project. The output directory does not exist.
If I revert the solution back to Azure SDK 2.2, the problem goes away. So there's some configuration that's added by the Azure SDK 2.3 upgrade that is causing this issue. This ONLY happens when I'm running the Azure Emulator. One thing I've noticed is that the build process somehow removes the "Debug" folder from the csx directory. When I manually add it back in, the build process removes it again and then I get the same error above. I'm at a loss as to what might be causing this since my "Active solution configuration" is all set to DEBUG for "Configuration" and ANY CPU for "Platform". I've tried all the troubleshooting steps from earlier threads on this issue (with Azure SDK 1.8) with no luck. I would appreciate any helpful suggestions on this. Thanks.
NOTE: Interestingly enough, if I deny all rights to the DEBUG folder in CSX, the emulator launches but then it fails because it doesn't have access to the DEBUG folder. So I'm puzzled by why the VS build process wants to remove that Debug folder.
ANOTHER NOTE: Apparently, it's the normal process for VS Build to wipe out the Debug folder. The run process with debug is supposed to recreate that Debug folder with everything in it. That doesn't happen. I confirmed this by reverting it back to Azure SDK 2.2 and noted that the run w/ debug actually recreates that Debug folder. This recreation process fails to happen when I upgrade to 2.3.
For me, the issue was I changed the Debug Solution Configuration to something other than Debug. Renaming it back to Debug fixed the issue.
I was able to solve this issue by simply uninstalling Azure SDK 2.3 and then re-installing it. That's it!
Got it solved by doing the following:
Change to "Release" configuration.
Build and run.
Change back to "Debug" configuration.
Build and run. No error now.
I was seeing the same error that the csx folder was empty. Doing the following fixed my issue:
Right click your *.ccproj > Debug > Start New Instance
None of the above worked for me, what did work was deleting the file
{YourProject}.ccproj.user
Close and reopen VS, build and run

Windows store app deployment error

I just downloaded and installed Visual studio on my computer (windows 8.1) to start building windows 8 apps. The problem is when I try to run any application this error message shows up (the application from this error message is called Parcels.comStarter):
Error 1 Error : DEP0700 : Registration of the app failed. Deployment
Register operation on Package
a783768f-d79c-495b-bf64-e59e4297fb42_1.0.0.0_neutral__1mfyfctfxa0tr
from:
(d:\Gebruikers\wardv_000\Downloads\Parcels.comStarter\Parcels.comStarter\Parcels.com\bin\Debug\AppX\AppxManifest.xml)
failed with error 0x8E5E0530. See
http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app
deployment issues. (0x80073cf9) Parcels.com
I searched the entire internet but I didn't found a solution. I also did reinstall visual studio and I still have the problem.
Thanks in advance
Open the Services management console (services.msc) and stop the Windows Installer service.
In Windows Explorer, go to C:\ProgramData\Microsoft\Windows\AppRepository\ and rename PackageRepository.edb to PackageRepository.edb.backup.
Back in the management console, restart the Windows Installer service.
Now run Visual Studio as an administrator and open your project.
I was having this exact same problem, and the solution for me was to unlink my Windows account from my Microsoft account.
There are a couple of things to try.
Run WSReset (press [Win] then type wsreset)
Delete the metastore and remotemetastore folder here: C:\Users\%userprofile%\AppData\Local\Microsoft\Windows\SettingSync where %userprofile% is your username. (I suggest just renaming them to metastore.old and remotemetastore.old)
Make sure that there are no staged packages for the app in question.
If you re-deployed an app that was already installed by some other user, then you would get a deployment error. This should wear off if you change the identity in your package.appxmanifest fie.
You should try an OS refresh. You should not lose your apps and settings.
After that re-link your windows account to microsoft account.
If that doesnt work...The problem may be that visual studio is not able to delete the application data in local folder. So when you go in the location C:\Users\UserName\AppData\Local\Packages you will find application data of app installed in your computer, now you need to find your app's application data and delete the folder. The folder name is the same as the package family name which you can see in your solution.
now again open the solution and rebuild and your app will run. (hopefully)
close visual studio and simulator before deleting the folder.
make sure that your account is set as administrator.
I had the same problem with visual studio running under Parallels VM. The solution was to copy the project from a cloud based directory to a local directory.

Debugger can't connect when starting local azure project

Ok, first of; here's what I did:
Install AZURE tools
Reboot
Start Visual Studio - new Azure project
Add web role (asp.net MVC 4 beta web role)
Hit F5 (debug)
It starts up the storage emulator and the compute emulator and starts to load in runtimes, and then I get a popup saying that the debugger couldn't connect.
Then after some googeling I'm suggested to try to run the application without running the debugger to see if I can acces the application. When I do I get this:
So I figure that IIS does not have permissions to access some file/directory. So I go to IIS and look up the application pool running the app, and it tells me that the identity in use is NetworkService, then I go give NetworkService full permissions to the entirety of the folder IIS has set for the application (which also happens to be the path to the project dir). Still I get the same error. Now I'm more or less out of ideas, but I try one last thing, which is to also give IUSR full permissions to the same dir, but this did not help either.
How can I go about resolving this problem? I haven't tried actually launching my project to Azure yet, cause if I can't even get it to work in development I don't see much point. Any and all help would be appreciated.
I ran into the same error today after uninstalling .NET 4.5/Visual Studio 11 Dev Preview, then installing ASP.NET MVC 4 Beta (this is before Feb 29th when the updated VS 2011 Preview drops).
Since I uninstalled .net 4.5, you just need to do an "aspnet_regiis -i" to ensure the .net framework (4.0) is set up with IIS 7.x this worked for me.
Edit: This will work if you uninstall/then manually install Visual Studio 2012 RTM as well.
I had a similar error yesterday. For me the problem was that the output of the build was empty in the target folder.
I tried to answer a similar question https://stackoverflow.com/a/9411422/182371:
Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log
file for the error messages. Mode details at
https://stackoverflow.com/a/8432621/182371
Make sure that the build output of your project is not empty. You can do this by going to IIS, find the site with the name similar to
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0', right
click --> Explore.... Make sure that this folder is not empty and
contains all the files required to start a web project successfully.
As for the Access Denied error:
it could be just an IIS default setting to disable browsing. To resolve that, just navigate to that web site in IIS, find Directory Browsing icon, and press Enable. You will at least see the files inside that directory.
Also try not only 127.0.0.1:81, buta specific document inside that folder, like 127.0.0.1:81/Default.aspx
Take into account the fact that there's sometimes some mess with the ports. You see that in the error message it's port 82, but in your browser it's port 81. So make sure you're using the right port. Or, even better, in your service definition try to use some non-standard port for this to avoid remapping.
I've met the same issue. In the end, I had to reinstall IIS 7.
I got this exact same error and tried a re-install of IIS and the Azure SDK - nothing worked.
Eventually tracked it down to the "IIS URL Rewrite Module 2". I went to the Control Panel and chose Repair and it resolved it. If you have a section in your web.config then this might be the cause.
Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. Worked for me on Windows 8 with Oct 2012 SDk when upgraded from 2011.

Debugging Azure: Error attaching the debugger to the IIS worker process

I have a web application asp.net to deploy to Windows Azure. I try to run it on local first. But when debugging, I catch this error from VS2010:
"There was an error attaching the debugger to the IIS worker process
for URL 'http://127.255.0.0:82/' for role instance
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0'.
Unable to start debugging on the web server ......."
I've search so hard to find the solution for this problem but there's nothing seems work for me. I'm a newbie in Windows Azure, it's really a big trouble with me.
I had similar problem with Windows 8, debuging a cloud application with Visual Studio 2012 RTM and Azure SDK 1.71, when trying to launch the application into the compute emulator. It was a very simple app, but I used Azure diagnostics. At the end these are two things I have changed that have work for me, both turning on Windows 8 features (so go to Win8 and open 'Turn Windows Features On/Off'.
Activate the checkboxes for:
Internet Information Services Hostable Web Core
Internet Information Services > World Wide Web Services > Application Development Features > ASP.NET 4.5
Internet Information Services > World Wide Web Services > Health and Diagnostics > Tracing
Internet Information Services > Web Management Tools > IIS Management Scripts and Tools
That worked for me, it makes sense, as I'm using Visual Studio 2012 and trying to get some trace information using diagnostics in Azure.
I hope this will work for you or give some tip about the problem. In the case of being useful information, remember to vote as response or as value tip.
Thanks,
Mike
This usually happens when there's a problem with the project to be deployed to the emulator (WindowsAzureProject2 in your case).
Try the following:
Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log file for the error messages. See more details in this answer.
Make sure your project can be started without the emulator. It's a web project, so just try to start it as a regular web project. Or publish it to the separate folder and try to create a website in IIS of it.
Check your *.csdef and *.cscfg files to make sure all the configuration is correct.
Make sure that the build output of your project is not empty. You can do this by going to IIS, find the site with the name similar to deployment16(6).WindowsAzureProject2.WebApplication3_IN_0, right click --> Explore.... Make sure that this folder is not empty and contains all the files required to start a web project successfully.
BTW, there's a similar question: Debugger can't connect when starting local azure project
Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. Worked for me on Windows 8 with Oct 2012 SDk
I just have today the same problem trying to Debug locally with Azure Storage Emulator in Windows 7. So in the Azure project properties, in Web tab, I checked the radio button 'Use IIS Express' and it debugged without problem. I hope this helps someone.
I encountered this exact same problem when I upgraded an existing Azure solution to the Azure SDK 2.1. After some hunting around I uncovered that the upgrade had automatically set the "Local Development Server" setting to "Use IIS Web Server".
Changing the "Local Development Server" setting to "Use IIS Express" fixed the problem immediately.
To access this setting right-click the Azure cloud project file in your solution, select the "Properties" option, tab down to "Web" and you'll see the following setup.
Also, make sure you run Visual Studio as administrator
Please check the version of emulator you have installed. If your code is created in older sdk and you have a new emulator installed it will give you this error.
Check the version of Azure APIs in your project, go to Project > references and right click on Azure dlls to check the version, same sdk version must be installed on the system, higher are optional as azure 2.x are not backward compatible.

Resources