T O P I C R E V I E W |
rab |
Posted - Feb 16 2010 : 10:03:06 PM After installing builds 1810 or 1812 when I load my solution in VS2008 I am prompted to write changes to my .vcproj files. This doesn't happen with build 1738. |
22 L A T E S T R E P L I E S (Newest First) |
agraham |
Posted - Jan 26 2012 : 5:44:03 PM Yup that sounds about right. Tho I think the failure to see a diff before was likely because whoever checked in that vcproj checked in one that had already been loaded and resaved by VC. Looking back at the history of that proj, it's checked in in VC2008 format about 50% of the time and pyproj's 2005 format about 50% of the time.
|
sean |
Posted - Jan 26 2012 : 4:58:39 PM Thanks for taking the time to run the tests. So it seems that the failure to see a diff before was just down to being unlucky in picking a random project that VC2008 didn't want to actually reformat.
I think the take away is that pyproj outputs a format that VC2008 wants to update in response to VA querying for project information. It would seem that if pyproj output a format that VC2008 didn't want to reformat, then the prompts wouldn't happen as demonstrated by tests 3 and 4. I imagine that when the project files are readonly, and you escape out of the dialogs at startup, VS doesn't retry on subsequent loads until, for example, the file timestamp changes.
The reason that this wasn't a problem before 1810 is that we used to (unreliably) parse the project files ourselves without using VS APIs. |
agraham |
Posted - Jan 24 2012 : 10:29:33 PM Hi Sean, some more details for you:
I can replicate the problem by simply touching the vcproj.
For example, make the vcproj writable, open in notepad, add a space and remove the space again and save, then make the file read-only again. Comparing the file to a backed up version with dos command fc: "FC: no differences encountered" - it's definitely identical.
Test 1: If I load up the solution with the touched, read-only vcproj, VC complains with "Edit of Read-Only File" with the typical options: Edit In-Memory, Make Writeable, Cancel. Hitting escape gives me "The vcproj cannot be edited" and escaping that actually brings up 16 more pairs of the same dialogs. From then on loading the solution works just fine.
Test 2: Touch the project again, but this time leave it writable. The solution loads up fine, but when I shut it down it prompts me to save. If I do so, diffing shows that the project has been totally rewritten - the formatting is all different and the tags are in different order. Various tags and properties have been added by VC. For example attribute TargetFrameworkVersion="0" has been added to the root VisualStudioProject tag. The reason for the difference is that the original vcproj was output by our pyproj script and not by VC2008 (although script's output is of course based on a real VC2005 project). It's hard to get a handle on exactly which tags and attributes were added since they are out of order so diffing is impossible. To be clear, VA never had a problem with the changed format pre 1810.
Test 3: Touch the project (that has been rewritten by VC) yet again and make it read-only again. Loading it up in VC is no problem now.
Test 4: remove TargetFrameworkVersion="0" from the root node and make it read-only again. VC doesn't mind that change.
Test 5: Regenerate the project to get the old VC2005 format back and make it read-only. As expected, VC is unhappy again. |
sean |
Posted - Jan 17 2012 : 5:33:33 PM Does your diff tool display differences in whitespace? If not, then can you try a binary diff? Maybe line-endings or other spacing are different causing VS to want to update the file? |
agraham |
Posted - Jan 17 2012 : 2:37:15 PM One more datapoint: After upgrading from 1649 to 1862 I have this issue. When launching VS, it wants to edit all 50 of the projects in the solution. I can just hold down the escape key to get around this. Luanching VS a second time there is no problem. I'm told that when I sync to a changed project in source control I will need to to the escape key trick again. I tried picking one project at random and checking it out and saving over it, and when I diffed it there were no changes.
As for your question Sean: pyproj is the tool we use here to generate cross platform VC projects from a list of source files. |
sean |
Posted - Apr 21 2011 : 12:04:31 PM What is pyproj? |
spaceman_spiff |
Posted - Apr 21 2011 : 11:17:23 AM Visual Studio 2008 Prof. C++ |
sean |
Posted - Apr 20 2011 : 2:54:53 PM What version of Visual Studio are you using? What is the language type of the project files being reformatted?
|
spaceman_spiff |
Posted - Apr 20 2011 : 12:30:10 PM if I check out the file that it wants to modify, it seems to be satisfied and no longer makes any more changes to that file.
Our SLN has a lot of project files, like 40 or more. I'm not sure that it makes a difference however.
There doesn't seem to be any rhyme or reason behind which project files it picks. It is not all of them, and seems to be different at different times.
It is pretty hard to see what has changed by looking at the diffs. There are a lot of formatting changes, things rearranged, etc. Our project files are generate by pyproj, so it is perhaps expected that the format would change from the way visual studio writes them. There are no obvious differences in the actual content.
|
sean |
Posted - Apr 19 2011 : 10:19:14 PM The only activity on this issue is right here in this thread.
If you allow the changes to be saved, does it continue to prompt to save on subsequent loads?
If your solution has more than one project, do you know if it is trying to modify all of them or only one in particular?
Doing a diff, what is the actual change (is it IntermediateDirectory)?
|
spaceman_spiff |
Posted - Apr 18 2011 : 12:02:53 PM Hi all,
Has there been any progress on this issue? I really like VA but I simply can not use it if it tries to modify my project files all the time. It is really annoying getting pop-ups. What's worse if you mistakenly click "Don't show this dialog again" then you get stuck and have to kill visual studio and hack the registry to fix it.
Cheers
|
feline |
Posted - Nov 23 2010 : 3:54:55 PM Unfortunately this is still under investigation.
If the external tool is simply rebuilding the solution files, without actually adding or removing code files to the solutions you could create a simple "dummy" VA solution instead. This solution would simply contain all of your code files to help you edit the code. |
lujeni |
Posted - Nov 23 2010 : 06:10:38 AM Hi ! I just downloaded the 1833 demo version and I noticed the exact same issue. Most of my vcproj are modified when using VAX. Since they're generated by an external tool, I have to reload/rebuild them each time they are regenerated (and that happens a lot). I can live with that, because of the comfort VAX is giving me appart from that, but it's pretty annoying. Does it worth the shot to download a beta version or is this issue still under investigation ?
Thanks |
Michal Puczynski |
Posted - Feb 22 2010 : 08:12:50 AM Hi, my 5 cents about it. I noticed strange behavior regarding project files when IDE hangs. The problem is present for years already. First time I saw it on very old 13xx builds. In very rare cases IDE hangs for a short while when closing. It unloads several projects from solution (seems normal closing procedure) but it stops at some point. When you choose to close it again it may ask you to save changed. It is a very bad idea to confirm it in that state. You loose remaining vcproj files and the solution file. I haven't notice that in 1810 and 1812 yet, but this post recalled me that this problem exists. |
sean |
Posted - Feb 18 2010 : 01:21:29 AM Yuck - that does sound like what might be happening - IntermediateDirectory is a property we query. |
rab |
Posted - Feb 17 2010 : 10:47:18 PM I am short of time today, I will do the requested tests as soon as I can though.
I can tell you this much: this is a once-only thing when I first open our solution after installing 1810 or 1812. One difference that I have seen in the modified vcproj file as added IntermediateDirectory entries for some configurations. It seems that VS can cope without these entries, however when you explicity query the project settings maybe it adds in missing entries? |
sean |
Posted - Feb 17 2010 : 7:53:37 PM If your solution has more than one project, do you know if it is trying to modify all of them or only one in particular?
Does this occur in any other solution?
|
sean |
Posted - Feb 17 2010 : 7:30:06 PM strange... in 1810+ we use the VS SDK to query projects for settings whereas in previous builds we manually parsed the vcproj files. So this problem could be a side-effect of using that API...
Are you only prompted to save changes when a solution is loaded?
Does it happen if you disable Visual Assist through the enable/disable item in the VAssistX menu?
If you do choose to save it, does it continue to prompt to save on subsequent loads?
|
rab |
Posted - Feb 17 2010 : 6:21:25 PM Yes. when I revert back to 1738 the problem goes away. I have done this twice now after installing both 1810 and 1812. I have no other add-ins.
I understand that VA doesn't modify project files, however there is an unexpected side-effect here. Maybe I should check the files in and see what happens when other people (without VA) use the projects..
|
sean |
Posted - Feb 17 2010 : 6:09:49 PM Visual Assist does not write or modify .vcproj files or project settings. Even if you use the IDE to make a change to a project setting, it typically does not reformat it unless you are converting an older format to a newer one.
When you wrote that the problem doesn't happen with 1738, does that mean you installed 1738 after installing 1812 to see if the problem stopped happening?
Do you have any other addins installed?
|
rab |
Posted - Feb 17 2010 : 5:44:32 PM It is very difficult to characterize the changes because Visual Studio tends to randomize the contents of the vcproj files whenever it writes one, so even normally what you woudl think is a one line change to a vcproj file turns out to be compeletly different because the elements of the new file are in a different order.
Having said that one thing that does stand out is the the file is "formatted" differently - it seems to have more lines (ie the output has been split into more lines to make it prettier) and have different indenting as well. This is not acceptable to us as we use source control and don't want this type of arbitrary differences. |
feline |
Posted - Feb 17 2010 : 08:32:07 AM This is very unexpected. Can you please try:
* backing up your .vcproj files * saying yes when prompted to save changes * close the IDE * diff these .vcproj files to see what has changed?
You can then simply restore the original .vcproj files to undo these changes. Hopefully knowing what changes are happening will give us some clues, but VA should not be having this effect. |