Visual Studio 2015 ftp publish method doesn't always update changed files on publish - ftp

We have been using the ftp publishing method to upload our site to an external server. But have recently discovered that some of the JavaScript files that have been changed are not being updated when published. We have checked on the server to verify if the files have been uploaded and only found the old versions, so it's not a cache issue.
Additional Information:
We are using Visual Studio Team Services
We are using ASP.NET MVC.
We have the 'Exclude files from the App_Data folder' File Publish
Option checked.
We are not sure what is causing this to happen but suspect that the issue might be caused by source control. That the files that have been worked on and checked in on one machine are not seen as having been changed by the Visual Studio on the machine doing the publication.
We've found this question Content files not updating with Visual Studio 2010 FTP Publish that seems to relate to the issue we're having but would prefer not to have to use the workarounds provided.
Is there a other way to fix or avoid this issue?

I've been experiencing this off-and-on with file system publishing. Out of pure desperation I created a new publish profile and...it worked.
It appears to be related an issue with the .user file that's created for the publish profile. While not a solution, a workaround at least can be to remove the .user file if a problem is encountered.
Related question: Visual Studio 2012 Web Publish doesn't copy files

Related

tfs 2010 with an upgrade visual studio 2012 want to download a Deploy.wdproj that was deteled with the last upgrade

I upgraded a visual studio 2012 web form application to Visual Studio 2012 and added the upgrade to tfs 2010. As part of this upgrade process, I removed a web deploy project from the solution file since I do not need the web deploy 2010 project anything. The application is now being deployed as a publish website.
The problem is When I obtain the updated solution file from TFS, it keeps saying 'projects have been recently added to this solution. Do you want to get them from source control? If I click yes, it wants to open -Deploy.wdproj that is not supported by the application.
If I click yes, nothing else happens. Should I get rid of this message?
According to your description and error message, this seems due to the project that was deleted from source control but still referenced in the .sln. The .sln was not aware of this. Please checkout the .sln file, and update the reference.
Another solution is unbinding and binding again the solution file.
1. Unbinding the solution file from TFS
Unbind the solution file (.sln) from TFS. Go to the menu File =>
Source Control => Change Source Control.
2. Cleaning the solution file by deleting globalsection
Clean the solution file (.sln) by opening it in a text editor. Remove
all occurences of GlobalSection(TeamFoundationVersionControl) =
preSolution. Including the mentioned starting tag and the ending tag
EndGlobalSection.
3. Bind the solution file to TFS again
Finally bind the solution file (.sln) to TFS again. Do this in visual
studio by going to the menu`File => Source Control => Change Source
Control
Take a look at this similar question: Every time I open my VS solution I get “Projects have recently been added to this solution. Do you want to get them from source control?” Hope this helps.

Unable to publish .PDB file for a Website application during TFS (2018.3) build process

We are facing an issue related to .PDB files for Website application and here is the details:
If we publish the website from Visual Studio 2017 (right click on website and Publish) I can able to see .PDB files.
We tried with command line query also but its not able to publsih the .PDB files.
Also we are not able to publish the .PDB files as part of the TFS 2018.3 build (vNext build).
FYI, I have followed all the suggestions mentioned in other post (Visual Studio 2012 Website Publish Not Copying .pdb files) but it doesnt worked for me.
The reason for asking different questions is, the other post was related to Visual Studio and this is related to TFS 2018.3.
Thanks,
Sam
I can able to resolve the issue by adding below MS arguments in vNext Build,
/p:DebugType=pdbonly
/p:OutputPath="$(Build.SourcesDirectory)****\Bin"
Thank you

Copy/Move Visual Studio Projects/Solutions To Another Computer

So I have a handful of Visual Studio projects that I need to move to another computer. Is it as simple as a copy and paste or will that mess something up? Both machines will have the same version of Visual Studio installed, so that shouldn't be an issue.
Is there an export function that I've overlooked?
If the Visual Studio version is the same, you can just copy the project folder.
Till the time you are moving your solution file and associated files you should be good.
In case you are using any source control update your solution from there.
Hope you have the same VS version and any addon frameworks you have
You can directly copy the project to the projects folder. This worked perfectly for Visual C++ projects for me (and also some other projects). But when I copied my Cordova App from one PC to the other (Both had Visual Studio 2015), I wasn't able to open the project. Whenever I tried to open the project, trying both the ways - directly from the Project file and the open option in Visual Studio, it at first opened but when I tried to open a file, it just got hung and didn't respond.
This problem may occur because Cordova apps have some configuration files that might be different for different PCs. I am not sure that this is the reason for the problem.
A solution that I used was that I created a new Project and copied the files to the project folders (excluding the configuration files).
Can you save the file to cloud? if so then you could potentially upload the file to cloud and download the file to the new

How do I open an unrecognized version .sln file in Visual Studio 2010?

I am new to web development, and have been having a considerable amount of trouble trying to get my asp.net project running using Visual Studio 2010. Please help.
I am working on a web development project that references a database using SQL 2008 R2. I was having problems with turning on/off features on my computer, the asp.net and .net features, etc. I would get an error that read "An error has occurred. Not all of the features were successfully changed." I tried several solutions to fix this, and none worked. I ended up using a cleanup tool I found online, it said use as a last resort, which is where I was at.
Here is the link:
http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog_Tools/dotnetfx_cleanup_tool.zip
This ended up fixing my problems with the features, but then I was not able to use Visual Studio 2010. I got an error "Cannot create the window". To fix this I ended up reinstalling Visual Studio 2010. Now I am again running into the problem where I cannot turn on the asp.net and .net features with the same error as before.
Now that is not my only problem, I cannot open my project solution file. It is giving me 2 errors when i open the .sln file "The selected file is a solution file, but was created by a newer version of the application and cannot be opened." and "The system cannot find the file specified." in that order. The .sln file says it is an unrecognized version.
I have previously worked on this project using Visual Studio 2010, before I tried to fix the problems with the features. I can still open other .sln files that I worked on before, but they do not reference outside sources. I have tried opening the .sln file in notepad and changing the version from 12.00 to 11.00 (on line 1) and changing #Visual Studio 2012 to #Visual Studio 2010 (on line 2). I need to work on this project as soon as possible. Any help would be great.
Will someone help me identify the problem?
How can this problem be fixed?
You don't necessarily have to use an existing solution. A solution file just references a bunch of projects and groups them together.
I would suggest you create a new blank solution and then add all of your existing projects into that one, assuming you don't have a similar issue with adding in the projects as well.

Opening a Visual Studio 2010 project in 2012 what creates the backup folder and how to control it?

I have an issue. We are upgrading to VS 2012 at work. When we open a VS 2010 project Visual Studio converts the project. This is fine, because VS 2010 can still use the project (yay microsoft). However, there is a \Backup folder created in the solution directory. Is this being created as part of the migration? Is there any way to control it?
The reason I ask is that the process that makes this folder copies web.config files into the folder. If you then try to build the solution (these are MVC projects), we get a "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS." error. The cause is that there is a web.config file in a subfolder instead of the root folder. We did not make and do not want this change, and cannot figure out how to control it. Deleting the Backup\Web.config file fixes the error. Renaming it from web.config to web.config.bak fixes the problem.
I don't really want to have to personally open and convert every single project, and don't want random people bumping into this problem. Any idea how to either stop VS from creating the Backup folder, or how to make it create them in the my documents studio folder etc? I can't find any setting to control this and can't find any good info.
By chance, are you using the MvcBuildViews property to pre-compile your views at build time? If so, this is why you're encountering this (since it does the pre-compile in the same directory, it doesn't filter out any of the files below the project directory).
Note that you will also encounter this issue if you use the Publish feature for this project. Publish copies the web.config under your intermediate build output directory (by default, obj/) before and after applying web.config transforms.
The good news is that in VS2012, or in VS2010 with the latest Azure SDK installed, pre-compile is now supported for Web Application Projects (including MVC). These settings are currently in the project properties, under the Package/Publish Web tab.
(this doesn't directly address your question about the Backup folder, but it was too long for a comment.)
There is no way to control it that I found. We had to go ahead and run through and convert every project to 2012 and delete the backup folders to prevent any other team from running into it.

Resources