问题
I'm using TFS Server 2010.
In my source I have a folder called BuildProcessTemplates
. This has a child folder called Custom Assemblies
.
Now, when the build runs, it happily loads the DLLs in the Custom Assemblies
folder and does its thing.
I need to modify the .xaml file that defines the workflow of the build. If I double click on the .xaml file VS tries to open it but throws an error saying it can't find certain types that I know are defined in the DLL that is in the Custom Assemblies
folder.
The workflow is told where to find these types when the build runs by Build Controller as it is defined as a property in the TFS Admin Console.
So, how on earth do I get VS to open my .xaml file properly? How do I let it know where to look for the DLL? I've tried moving all of the files in Custom Assemblies
in to the same folder as the .xaml file, but that didn't help.
Clearly I'm missing something; I just don't have a clue what it might be.
回答1:
You normally create a C# Project (Unit Test is easiest because it is pretty bare). When you have you project you then need to:
- Add the XAML as a File,
- Add the Custom Activities DLL's as references.
- Add the relevant TeamFoundation* references from the GAC (make sure the TFS version matches - 2010 = v10, 2012 = v11).
Also, I always open our TFS "Build Project" with VS version that matches our TFS Version, I find it keeps the number of problems down.
There's a great series of posts from Ewald Hofman here, that go through the process - I find it a bit dated, and that the Wrox Professional TFS 2012 book does a better job of explaining it, if you can get a copy.
来源:https://stackoverflow.com/questions/23894190/how-do-i-modify-a-vs-build-workflow-if-vs-cant-find-any-custom-dlls-it-uses