When I compile I often get the following error:
Error 28
Error : DEP0500 : The folder "C:\Code\Cloud\SolutionFolder\ProjectFolder\bin\Debug\AppX" could not be deleted.
Access to the path 'C:\Code\Cloud\SolutionFolder\ProjectFolder\bin\Debug\AppX\ControlsProject.Controls\Themes' is denied.
If I close down Visual Studio (2012 RC) I can delete the folder and recompile so I'm assuming VS is locking the file for some reason. Has anyone else experienced this? Has anyone found a fix?
Here is what you're probably looking for. Seems like you have two options - either re-create the solution file or use Process Explorer to close existing handles to the locked path.
Here's another option that worked for me - reset your VS settings.
http://socialeboladev.wordpress.com/2013/02/21/dep0500-and-dep1000-errors-when-deploying-windows-store-apps-from-vs/
I'm handling this problem using LockHunter.
Download LockHunter at http://lockhunter.com/download.htm.
Create a shortcut to the AppX folder on your desktop.
Whenever AppX is locked in Visual Studio open the shortcut to AppX.
Right-click AppX and select "What is locking this folder". This will open LockHunter.
In LockHunter click "Unlock it!".
After unlocking AppX go back to Visual Studio and compile/run the project.
Related
I have tried to create an .exe file to my WPF App and SQL Server related databse with EF Core using Windows Setup Installer Project.
I included all the dll's files from /bin/Release and built it for any CPU.
The Setup Project has been created successfully and it worked on my PC as I expected.
Otherwise when I try to install the Setup File on another PC, I can't even open it up and see what's wrong.
I guess the problem comes from the database but I can't find anything helpful on the internet.
So you get the application installed, run it and nothing happens, right? Here is what you do:
Run it. Watch nothing happen
Hit the Windows key and type "Event"
When "Event Viewer" appears in the list of applications, run it
In Event Viewer, go to Windows Logs >> Application
Near the top there will probably be an error entry. It will probably be related to your application. And if you were missing a key file needed to run your application, like a DLL, the name of the file will probably be in there in the details section
Go back to your installer and add that missing file. Or if that file is part of some support package (like, say, MS Redistributable for Visual C++) then add the installer for that too.
Using Visual Studio 2017 on Windows 10, I have a WPF application with an installer created using the Visual Studio Installer extension. When I install it on another PC, the application starts but then exits within the same second. Nothing in logs.
If I add a manifest to force admin mode, its starts correct.
If I copy the files to another folder (outside program files) it starts correct.
Apparently the "program files" is restricted or something? Am I missing something in my setup/installer project? Any other ideas more than welcome!
EDIT:
I've tried to create the installer using WIX and then it runs fine. Seems to be some settings in the VS Installer extension.
You can modify the ACLs on the folder in question to allow write access by regular users (not great) or you could write the settings file somewhere else where write permission for users is standard.
There are many ways: Resolve lacking permissions.
There is another, similar answer here.
Adding a couple further links:
WiX and deployment links, various topics.
I am trying to run a C code in microsoft visual studio 2015.
For some reason, the run bottom is changed to "Attach to a process".
And when I attach any of the process, the process wouldn't start to run (command prompt would'nt open).
That's a picture of my visual studio and the attach to process window:
May be because the code you have compiled gives only a Dynamic Link Library (DLL) file. So you need to attach it to a process (.exe file) which will load the (DLL) for execution.
Also, why 0 projects?
I had the same problem on Windows 10. Adding dotnet path as a system varible solved my problem.
This may be helpful for others;
Right click on This PC and select properties.
Click the Advanced system settings.
Then click the Environment Variables.
In the System Variables section, find the PATH environment variable and select it. Click Edit.
Click New and paste your dotnet path (my path is C:\Program Files\dotnet)
I've packaged my WinForms app with the Visual Studio Installshield Limited Edition wizard.
When installing the app, I get this error during installation.
Error 2715. The specified File key ('myappname.xml_serializa') not found in the File table
Any ideas from anyone? I'm completely loss on this one.
In your installer project directory, open the *.isl file and search for the text in your error message, myappname.xml_serializa. It will most likely be in there quite a few times. Either remove it or correct all instances of it.
I had a similar problem recently and found out that it didn't find the key because I was not adding the .primaryoutput file on the section Specify Application Data -> Files. Check if you are adding all the necessary files for your setup before creating the installer. The installer will be created even if it doesn't have all the files, but it won't execute properly.
Hope this helps
Changing the *.isl file resolved our issue. I found that we had changed the .NET framework of a project and when we removed the project output from the Installshield using the prompt it did not update this file so when we added the output again it now contained two outputs. OUTPUT and OUTPUT1. Hope this helps
This is what worked for me: The project in my case was readonly as it was connected to TFS. If you are working offline, make sure you make the project files writable. (Uncheck Read Only at the folder level)
This worked for me:
In your setup project double-click Project Assistant.
Click on Application Files.
Select file(s) with the file extension that was reported in the error message(s).
Click on Delete.
Repeat for any files as needed.
Go back to setup project in Solution Explorer.
Click on Rebuild
I created a shortcut from the application .EXE in Visual Studio Installer, but the resulting shortcut did not have the option of "Run as Administrator" when I right-clicked the shortcut icon.
The application .EXE in Program Files does allow this option on right-click. If I created the shortcut manually from the .EXE (i.e. "Create Shortcut") instead of from the deployment, then the resulting shortcut also has that option.
How to a deploy an application in Visual Studio Installer to include a shortcut that has "Run as Administrator" option enabled on right-click?
I spent ages looking for a solution to this. Amazing, really, as it must be the case for all Visual Studio installer projects.
I'm using Visual Studio 2017 Community at the time of writing and I can't see any option to do this from within the IDE.
Apparently this is an issue with the resulting .msi where the shortcut created is an "advertising shortcut". I'll leave you to discover what you want to know about that in your own time. (Personally, I don't care.)
What you need to do is force the shortcut to be "non-advertising".
This is the better of the two solutions I've found squirreled away in SO. I think it's better because it 1) doesn't include adjusting your installer project for each solution and 2) doesn't involved manually editing the .msi file after every build.
Full credit to the guys on this SO post for this solution, btw. You know who you are. I'm posting because it's not obvious from the question that it will solve this particular problem.
What you do is make a generic change to the msi creation schema file so that the change propagates to all of your future builds. You'll need Orca to make the initial change.
Download the Windows SDK Installer here.
Select "MSI Tools" in the installer.
Install Orca-x86_en-us found in {Installation Folder}\Windows Kits\10\WindowsSDK\Installers.
Find the file "Schema.msi" which is located somewhere like {Visual Studio Program Folder}\Common7\IDE\CommonExtensions\Microsoft\VSI\bin\VsdSchema.
Open "Schema.msi" in Orca.
Copy the folder to the Desktop if it is read only and replace the original after step 9.
Select the "Property" table on the left.
Add a table row with property DISABLEADVTSHORTCUTS and value "1" (true).
Save the file and close Orca.
Rebuild your installer project and (re-)deploy your application.
Enjoy the ability to "Run as administrator"!
A final note: I've found that updates to Visual Studio can overwrite the change you've made, once again removing the "Run as Administrator" context option. So check the msi file after each update.
If you have a manifest, you can require to have administrator privilege, add the following to your manifest
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
see http://msdn.microsoft.com/en-us/library/bb756929.aspx
You can also run any filetype as administrator with the help of the registry, see http://www.howtogeek.com/howto/windows-vista/add-run-as-administrator-to-any-file-type-in-windows-vista/