newky2k / VersionChangerAddin

Visual studio addin to change solution version numbers
MIT License
24 stars 13 forks source link

errors when updating #42

Open tonyguar opened 9 months ago

tonyguar commented 9 months ago

Ever since I updated VS to v17.8.5, every time I try to update the version numbers in my project, the "Version Changer" comes up with the file being in use. The file still gets updated, but "Version Changer" stops processing. I have 16 projects that need to be updated, and it will stop after updating each one, so to proceed i need to untick the one it just did, and press "udpate" again, and then it will again error when it does the next one. this worked perfectly in the previous version of VS.

newky2k commented 9 months ago

@tonyguar Sorry that you are having an issue. I'll take a look and see if I can figure iut whats going on.

The update does two different sets of changes as not all of the properties are available through the project meta data so it has to update the csproj file directly. It sound like something has changed that causing the file to be locked now.

newky2k commented 9 months ago

@tonyguar actually what type of projects are they also, .net core sdk-style, .Net framework old style etc?

tonyguar commented 9 months ago

there are two parts: one a winforms with .net 4.7.2 also using DevExpress winforms controls (don't think this has anything to do with it). and the back end is a WebAPI2 asp.net v4.7.2 as well it just fails at the first project that is clicked in the list.

newky2k commented 9 months ago

@tonyguar I have a mixed sample solution that i use for testing which has a .net 4.7.2 class library and a few others besides, and it worked fine on 17.8.5.

Just to be sure I added both types of project you mentioned and again had no issue.

Does DevExpress have an VS extension. might be worth disabling it temporarily to see if that is causing the issue.

When processing an older framework project VersionChanger uses the VS project api to open, save and close the project file. it sounds like thats where is failing.

tonyguar commented 9 months ago

hi

is there a log that is generated?

the exact message is:

Version Changer

The process cannot access the file 'XXXX\Properties\AssemblyInfo.cs' because it is being used by another process.

OK

I downloaded the source but I have no idea as I never done extensions and xaml stuff. Is there a way to set the VS debugger and see where it fails?

newky2k commented 9 months ago

@tonyguar I am still unable to replicate this. Can you try disabling the DevExpress extensions and see if it makes a difference.

Otherwise, once you've checked out the code it will run as a normal app, but the target will be an instance of visual studio. You should just be able click the play button and then open your solution. This will run the extension in debug mode.

Also, i've just noticed that they have released 17.8.6 so you might want to see if it makes a difference

tonyguar commented 9 months ago

Hi

I ran the version changer via the debug. and it worked fine. but i noticed that the VS Instance it creates for debugging does not have many of my my extensions in it. basically the only ones there was the version changer and the DX plugins - so i can say that the DX plugins don't affect it). i don't have much time. but i disabled these: