I am having several problems with the “Build VS.NET Solution”. These are old problems I think, but now I am doing quite a bit of research to find a way around them.
Initial problem that I wanted to find a workaround for: The action doesn’t hold on to the list of projects. Seems the list is emptied now and then when I open the project to do other stuff.
So I thought I’d work around that by setting the list at runtime. I clear the list, and add items one by one, or from a string list. This works sometimes, but most of the time this error message shows up in the build log: “A Project selected is no longer part of this solution, please open the action properties dialog and select the correct projects”. That’s not correct.
Adding a single project sometimes works programmatically, while adding multiple projects rarely do, but results in that error message.
I noticed that the action dialog box gets filled with the items that I set in the BeforeAction event.
Looks like the “Build VS.NET Solution” action’s design time project list is modified when the script is edited or run, and this somehow also interferes with scripting.
Hi Brent
The issue with the project list clearing has to do with the action loading the solution file when the dialog is opened, unfortunately it doesn’t store the list of projects, only the list of selected ones. I have made a change so that it will store the list of projects with the action.
There is no distinction between designtime and runtime action in FinalBuilder, if you modify an action at runtime and then save the project you are modifying the project.
I’ll post here later today when a build with the above mentioned change is available.
This build should behave a little better : http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700_2134.exe
2134 seems to have corrupted the action in the script, and FB crashes every time I open FB, then the action, and try to edit the project list. I can probably get around that by copying an old copy of the action into the script file, so that’s not a practical problem right now.
I guess part of the original problem is that I use the following string as the solution in the action, and the variable %SourceFolder% is not initially set, but calculated at runtime:
%SourceFolder%\Source\Detec Next\Detec.sln
Because I run and debug the script while I develop the script, as you have explained, the project list is populated at some point, and then I get to select the projects I want compiled. But then next time I open the script, there’s a problem editing this action again.
I don’t have any bright ideas how to design this action’s dialog box.
In any case I think my idea of using a script in the BeforeAction event is the best solution. I just don’t know yet how to avoid the errors I reported earlier, but will try out some ideas.
Can you send your finalbuilder project to support as well? I’m not able to reproduce the issue here, so I need to load up a project under the debugger and see what is happening.
Vincent, I didn’t realize until right now you added the AllProjects property in 2134, and it wasn’t there before. Anyway, I was trying to put this into the BeforeAction event of the action:
Action.SelectedProjects.Clear
Action.AllProjects.Clear
Action.AllProjects.Add(“DetecAS.Applications.Next.Server”)
Action.AllProjects.Add(“DetecAS.Applications.Next.Client”)
Action.AllProjects.Add(“DetecAS.Applications.Next.LogViewer”)
Action.AllProjects.Add(“DetecAS.Applications.Next.Client.AdminTool”)
Action.AllProjects.Add(“DetecAS.Applications.Next.ArchivePlayer”)
Action.AllProjects.Add(“Player”)
Action.AllProjects.Add(“DetecAS.Applications.Next.Client.AdminTool.Helper”)
Action.SelectedProjects.Add(“DetecAS.Applications.Next.Server”)
Action.SelectedProjects.Add(“DetecAS.Applications.Next.Client”)
Action.SelectedProjects.Add(“DetecAS.Applications.Next.LogViewer”)
Action.SelectedProjects.Add(“DetecAS.Applications.Next.Client.AdminTool”)
Action.SelectedProjects.Add(“DetecAS.Applications.Next.ArchivePlayer”)
Action.SelectedProjects.Add(“Player”)
Action.SelectedProjects.Add(“DetecAS.Applications.Next.Client.AdminTool.Helper”)
I was doing this on a copy of the project saved before I got 2134, but now opened in 2134.
When ran it failed with “A Project selected is no longer part of this solution, please open the action properties dialog and select the correct projects”.
The projects are all in the solution, and shows up in the action’s dialog.
So I started debugging by commenting out stuff from that event script and running again and again. The project list in the dialog actually reflected the projects the script added at one point. But later it again got the entire project list from the solution.
Then I discovered something odd. Only one project causes that error message. The “DetecAS.Applications.Next.Client.AdminTool”. I was thinking perhaps the string length was a problem, but as you see there is another project with a longer name in there.
I remember I did a similar but quick experiment a while ago, and that same project was one of several things I suspected.
What am I looking for? Is there something odd in the solution file or that particular project file that cause FB to trip?
Unfortunately I do not have the project file from when build 2134 crashed on editing the project list. However, at the time I did compare it with the one used before 2134. The only change was the new project list, and a few variables changed when running the script. I got around the crash by removing the project list - at least I thought so - but the project list appeared again later of course. I never had a crash later.