Detected file changes on Visual Studio 2012 - c#

How can I show detected file changes TFS on VS 2012's TFS as I can see on Visual Studio 2015.
I have Visual Studio 2015 installed on my personal laptop but I use another one from my company that has VS 2012 and.
I make some local (offline) changes (using notepad) and would be important to me seeing these changes.
Any help?

Your requirement can't be achieved. Only when you use a local Workspace, and change something outside Visual Studio, your workspace detects the changes. But your VS 2015 and VS 2012 install on different machine, which means you are using two local workspace, so you are not able to see the detected changes in VS 2012 on your company's computer.
You may promote the changes and check them in in VS 2015 on your personal laptop, then you can get the changes in VS 2012 on your company's computer.

All file edits are performed locally and the edits cannot be seen by everyone else until they have committed (check-in) or shelved. Normally Visual Studio is used for editing the files, and it will mark the files as checked-out by you, so your team members can see that you are working on them.
If you use another editor than Visual Studio the files will not be checked out and no one can see that you are in the process of editing the files. You will then have to do a check-out of the file before you can make a check-in.
You can add an e-mail Alert for when changes are committed to a file or folder, but again this only lets you know when a check-in is performed.

Related

Windows Forms keeps being checkout in Visual Studio and Azure DevOps

I have a Windows Form project and I migrated it to Azure DevOps (TFVC - Team Foundation Version Control). I'm also using Visual Studio to develop it. The problem is that whenever I open a form by double clicking, all of its files (.cs, .Desginer.cs, and .resx) are checked out automatically. However, when I compare them with the latest version from the server, I see that no change has been made to them. This does not happen to other projects I have, which are mainly ASP.NET Core projects.
If I manually edit a file and undo my editions, Visual Studio knows that they are not changed and remove them from the list of pending changes. But here, without any changes, Visual Studio always lists them in the Pending Changes list. The problem is that each empty check-in litters the history. When we want to trace a change we see a lot of check-ins that have no change in them.
Why this happens and what should I do to fix it?
Windows Forms keeps being checkout in Visual Studio and Azure DevOps
It seems a known issue about the Visual Studio:
Opening a Windows Form in the designer checks out the file
And this issue should be fixed in the Visual Studio 2017 version is 15.1 (26403.0).
Please try to update your Visual Studio version and re-check it.

Can't sign in to Microsoft Account

I need to unlock the visual studio community 2017. It said that I must sign in to unlock the product. But when I tried to sign in, I got this notification:
When I tried to add an account. I got this notification:
Please go to https://login.live.comand check if you could log in successfully and try clearing the history files in your IE, then close all IE's and restart your pc to try again.
Besides, the problem may be also related to your Visual Studio itself. Please try repair your Visual Studio to check whether this problem can be fixed. You could also open Windows Explorer, and navigate to \Common7\IDE (by default is C:\Program Files or Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE), and run the following commands:
devenv.exe /resetsettings, it will restore Visual Studio default settings. Optionally resets the settings to the specified .vssettings file.
devenv.exe /resetuserdata, it will take a couple of minutes to run as Visual Studio cleans up and sets itself back to its original state.
Reference From: https://developercommunity.visualstudio.com/content/problem/201565/sorry-we-ran-into-a-problem.html

Visual Studio Rebuilds unmodified projects sometimes after a PC reboot

I've a Visual Studio 2013 solution with about 50 C# projects. Normally if I select build (F6) it just builds the projects which have changed. But sometimes after a I shut down and restart my PC it rebuilds all when I select build (F6). Why?
This doesn't happen all the time when I restart my PC. Most of the times it says that all projects are up to date after a reboot. But sometimes it rebuilds all.
I took a look at the following question Visual Studio Rebuilds unmodified projects and its answers.
The next step I did was to set the build output verbosity to diagnostic.
I'm getting the following output when Visual Studio rebuilds all after a PC restart:
1>Project 'Project1' is not up to date. Missing input file
...
There much more lines (more than 1000). I took a look at them but I still don't understand why Visual Studio rebuilds the project.
Update
Why does Visual Studio needs the following file?
1>Project 'Project1' is not up to date. Missing input file
'c:\users\wo\appdata\local\temp\.netframework,version=v4.5.assemblyattributes.cs'.
...
For future travelers, I think it's also just a bug in current versions of Visual Studio 2019, 16.6 and newer.
This problem happens for me with Visual Studio 2019 versions 16.6.0 and 16.6.1. I have cross-version aware C# projects that do not have this issue for 2010, 2015, 2017, or 2019 16.5 and older, on the same machine and same user, with the same project in the same folder and solution.
With the recent 2019 versions (in the last month or so, May and June 1st 2020) I get similar message:
1>Project 'Banana' is not up to date. Missing input file 'c:\users\banana\appdata\local\temp.netframework,version=v4.7.2.assemblyattributes.cs'.
If I clean then build, then its normal. If I run a successive build I get the error.
This happens with or without reboot, and after cleaning temp folders even, or if I run Visual Studio with admin or not. The path its trying to find really exists, and pops up if paste in explorer.
I've completely cleaned all but the code files with fresh folders and have the same issue. For me it's only with C# projects. So I think it's a 16.6 bug.
See recent changes:
KirillOsenkov commented on Jan 4 2020
#livarcocc would it be possible to prioritize this? This is an impactful issue that's very easy to fix and has been open for three years now. Seems like low-hanging fruit.
bording commented on Feb 12 2020
With the fix for this being merged into master now, which release will it be a part of? I see that this issue is on the 16.5 milestone, so does that mean it will be in that release, or does the fix also need to be ported to another branch?
tmat commented on Feb 12 2020
#bording I updated the milestone to 16.6 as I believe master is 16.6.
https://github.com/microsoft/msbuild/issues/1479
Visual Studio Rebuilds unmodified projects sometimes after a PC reboot
One possibility that caused this issue is that the building account lost permission to the temp folder. To resolve this issue, you can try to grant permissions read/write/execute to the temp folder, or maybe try running visual studio as administrator to see if it is permissions related.
As we know, if we Open/Build a project in visual studio, .NETFramework,Version=v4.x.AssemblyAttributes.cs appears in temp folder automatically. If you lost permission to the temp folder after restart PC or not running visual studio as administrator, we could not access the temp folder, then Visual Studio will report that it can not find the file version=v4.5.assemblyattributes.cs in the temp folder.
Alternatively, you can also generate this file into the Intermediate directory (usually called obj) by adding following property to the project file:
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
Credentials: MSBuild: unnecessary rebuilds because of generated AssemblyAttributes.cs
Hope this helps.

Visual Studio 2012 macros uses VS2010 values

My working computer had Visual Studio 2010 installed previously. It was working fine.
To gain full support for C++11, the 2012 was installed to this computer recently (VS2010 was not removed, since some old project need it).
My problem is:
If I launch VS2012, the Visual Studio user values (e.G. $(VSInstallDir), $(VCInstallDir), $(ExecutablePath) etc.) are the VS2010's values, not the values suitable for VS2012.
What is the reason for it? And how can I solve this problem? The VS2012 must use its' own user values.
Since multiple installations are there, you can select the Platform Toolset from
Project Property Pages\ Configuration Properties\General\Platform Toolset
If it still doesn't work, do the following as last resort:
Edit the following file to change the macros:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Common.props
For me it is V120. Whatever version it is for you, change it accordingly.

How to add reference `Microsoft.TeamFoundation.TestImpact.Client.dll` in Visual Studio 2012?

I'm writing a customized activity for TFS build process workflow, e.g. guideline here.
The post requires to add reference to Microsoft.TeamFoundation.TestImpact.Client.dll at path C:\Windows\assembly\GAC_MSIL\Microsoft.TeamFoundation.TestImpact.Client\10.0.0.0__b03f5f7f11d50a3a. I cannot find this path on my machine installing Visual Studio 2012.
Where would I find this reference?
This is an old thread, but in case anyone else runs into this, just download the stand alone TFS Object Model installer.
As the other answer states, it's shipped with VS 2010 so you'll need to install that and then you should be able to find it.
For any of you trying to do this with VS 2013 / TFS 2013 you need Microsoft.TeamFoundation.TestImpact.Client version=12.0.0.0
This file is located in the folder
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.TeamFoundation.TestImpact.Client\v4.0_12.0.0.0__b03f5f7f11d50a3a
Version 10.0 of the file is shipped with Team Explorer or Visual Studio 2010.
It is copied directly to the GAC but you can extract it using the command line COPY command.
Install VS 2010 on your machine, open a command prompt and navigate to C:\Windows\GAC_MSIL\Microsoft.TeamFoundation.TestImpact.Client\{Version}\
Then COPY Microsoft.TeamFoundation.TestImpact.Client.dll to a folder of your choice.
Finally, my advice would be that you use the version included in VS 2012, that would make things much easier. The method described above also works for Microsoft.TeamFoundation.TestImpact.Client.dll 11.0 (aka VS 2012 version).

Categories

Resources