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.
Related
A few days ago, I set up a Windows 10 by clean installation and then installed Visual Studio 2019 Community on it.
Now, I want to customize Microsoft.Cpp.Win32.user.props and Microsoft.Cpp.x64.user.props files to add additional include paths for all my VC++ projects.
But I can't find these files on my brand-new machine.
They should be located at %localappdata%\Microsoft\MSBuild\v4.0, but there is no MSBuild directory.
Does it mean that the installation of Visual Studio failed, or do I need some additional procedures to create default *.user.props files?
I've confirmed that the VC++ can build a simple hello-world project.
Edit: Attached a screenshot of the Property Manager. There is no user property sheet.
According to Microsoft, VS 2019 no longer creates the .props files by default.
From Cannot see Microsoft.Cpp.Win32.user in Property Manager:
The behavior is intended. Visual Studio 2019 will not create .user files anymore. But if .user files already exist, projects will automatically import them.
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.
I'm using Visual Studio 2015 update 3 with TFS hosted at visualstudio.com.
When I add a C# class file to one of my projects in Visual Studio, it's not automatically added to source control. For other projects in the same solution, C# class files are added automatically, as expected.
When I then add the file, manually, in the project with this problem, I get the following question;
I have to confirm to add the file to source control.
There is a similar question (Visual Studio 2015 new files not being added to source control automatically), associated with a "release" branch, which is not the case here (at least I think so - our TFS-project has never been branched)
We've never configured any .tfignore manually.
This started to happen recently and occurs on all development machines, so it's probably not a client machine issue.
I'm clueless, so any help is highly appreciated.
UPDATE
I've discovered that the problem occurs in projects with names ending with ".Lib"
Projects:
Core (ok)
Core.Lib (files not added automatically)
Communication (Ok)
Communication.Lib (files not added automatically)
I tried to add a test project Test.Lib to my solution. This project was not added to TFS either, but project Test was.
The "lib" extension is the problem. Try renaming the project folder to something else, eg. "CoreLib".
To reproduce this behavior / bug, try the following:
Create a Test directory in a directory controlled by TFS
Create a Test.Lib subdirectory in this directory.
Add a file, test.cs, to Test.Lib. (Test\Test.Lib\test.cs)
In Visual Studio's Source Control Explorer, try adding the new Test directory to source control. You'll see test.cs on the "Excluded items" tab.
The "lib" extension is used by binary files, and these are ignored by Team Explorer by default. I haven't found an official list of filetypes anywhere, but other affected file types are dll, exe, obj and possibly others. You can include these files manually by right-clicking them and selecting "Include".
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.