I have a folder to which my file upload control writes files. When I publish the project, the folder is deleted and recreated. This is expected, as I am using the Folder (FileSystem) publishing method with the Delete Existing Files (DeleteExistingFiles) flag. In the process, however, the write permission on my folder are removed, thus breaking my upload process.
I've already tried adding the following into my .csproj file, but it doesn't work for me:
<IncludeSetAclProviderOnDestination>False</IncludeSetAclProviderOnDestination>
Part of my challenge here is that I can't find any documentation regarding this for Visual Studio 2019, only older versions.
Related
Team Foundation Server 2018 / Visual Studio Professional 2017 - Version 15.9.5
When i manually create a new file in Windows Explorer in a certain directory that is part of the TFVC source controlled tree, that file gets automatically added to TFVC pending changes (as "add"). Note that the file is not part of any project.
(The solution was opened in Visual Studio at the time the file was created).
This does not happen in other directories. I can add files to windows directories and they will NOT automatically be added to TFS and need to be manually added to TFS within VS Source Explorer. This is the expected behavior for me.
So it seems it is some configuration of a specific folder?, but i can't find it.
Didn't even know this was possible.
Can you tell me where to look?
FYI, this is a local workspace.
Edit: I have the TFS Explorer extension installed.
Edit: The new file is only added to pending changes when VS is open when creating the file in the folder. I did a test with VS closed, then create new file. Then reopen VS with solution and the file does NOT appear as a pending add.
When your workspace is configured as a Local workspace, files and folders are automatically detected and added (unless excluded by a .tfignore file).
Generally Local Workspaces are way more convenient, and are the default for workspaces with fewer than 100000 files (and with a fast system can exceed that number). It can be beneficial to configure a good tfIgnore file to control what is added automatically and what is ignored.
When there are no explicitly Included changes in your Team Explorer and you're in a local workspace, Visual Studio(2017+ from the to of my head) assumes you want to add all new changes and will auto-include them.
When your workspace is configured as a Server workspace, files and folders need to be manually added/removed, unless the changer are made through an IDE that is aware of the repository (Visual Studio will auto-add changes made in the solution explorer).
You can check the type of your workspace from the commandline:
tf workspaces /format:detailed /collection:https://dev.azure.com/jessehouwing
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise>tf workspaces /format:detailed /collection:https://dev.azure.com/jessehouwing
=======================================================================================================================
Workspace : JACKIE
Owner : Jesse Houwing
Computer : JACKIE
Comment :
Collection : https://dev.azure.com/jessehouwing
Permissions: Private
Location : Local
File Time : Current
Working folders:
Or from Visual Studio:
I am attempting to exclude umbraco, umbraco_client, and media folders from publishing via visual studio. I have followed the steps in the previous question: excluding folders from Visual Studio 2015 publication and it doesn't work for me.
I copied the code in the linked question but still the umbraco folders were published. .wpp.targets File is in the same folder as the .csproj file with the same name as the csproj file
Copied the code in the previous link... saved the file. Closed visual studio and re-opened it. Even went one further and restarted my system.
Opened VS and tried to publish... both umbraco and umbraco_client were still published.
Notes: both folders are not included in the SLN/CSPROJ.
I'm trying to open existing files that were previously opened as a project in Visual Studio, but I moved them and renamed the folder. How can I open these files in Visual Studio as a project?
I'm not sure what you mean by website project. If its the solution files you want then way I found worked for me.
However, If its the project files that add DLL's to your site you will need to create a new project of the same type and copy your code in that project. But the Project file that opens these should still work if it was copied over with the other files.
To add an existing folder to a Solution: Open the the folder as a new website. Ensure that any old .sln files are deleted from the new folder.
When you attempt to close Visual Studios it should prompt you to save your site in a new solution(.sln) file
I created a C# project and added it to source control (mercurial). I can edit files in VS, commit it and push it using TortoiseHg. It goes to the server. When some one pulls they get the files.
In my visual studio I added a folder and a file inside that folder. I used TortoiseHg and it saw the new file in the new folder. I committed it and pushed it.
However, now someone pulled the latest code from the server - and they got the new file (it is visible through windows explorer), but when they open the solution in VS, they don't see the file.
Does someone have an idea what is wrong here? or things I should check? Thank you for the help.
P.S. I have visual studio 2010 express (so I can't use the VisualHg plugin).
Visual Studio caches changes to the solution and project until an explicit save or a build. In your comment:
In my visual studio I added a folder and a file inside that folder. I used TortoiseHg and it saw the new file in the new folder. I committed it and pushed it.
I see that an updated .sln or .vcproj file was not mentioned and checked in. Did you see an update to either of these files via TortoiseHg? If not, make sure to build or save your project after a change like this.
Did you make sure that the Visual Studio Project File or Solution file is being updated and committed?
VS solution contains projects and each project select managed files by metadata(***.vcproj file). It's not the way include all files from root directory.
So, your co-workers can see new added files by in following two ways.
1) share project file(***.vcproj)
2) manually add files in each person's VS instance.
In my web project I often have a number of files in my app_data folder. These files can vary from time to time (example translation files get a new language, lucene index gets updated and gets a new file name etc).
Visual studio only adds files to the deployment process if the files are seperately added to the project. So if a file has been added on disk, but not in the project, this file will not be copied to the server...
Is there a way to make VS add all files in a folder to the deployment process without me having to update it manually?
You can use a post build event to copy the contents of a folder to the build target.
This should get you started:
http://visualstudiohacks.com/general/customize-your-project-build-process/
Wow I just saw this was asked in 2009...I hope you figured this out already :)