问题
weWithin our development environment we have VS2010 installed on my computer along with Expresison blend and silverlight4 tools. We have a separate build box where we compile and build the entire project. When running through the precompile I am receiving errors that references to the expression blend namespaces cannot be found. I assume this is due to the fact that expresison blend is not installed on the build box.
What is the best practice to prevent this from happening in the future? One solution presented was to just install expression blend on the build box but to me that seems unnecessary.
I have also thought of creating a lib direcotry within my project/solutions files and then add all assemblies there. Then within the references directory add them, but point to the lib directory within the project. I haven't done this only becuase if feels as if it is somewhat of a hack as I am basically creating duplicate dll's so there is no versioning or control over when a dll becomes updated etc that could potentially lead to problems down the road.
Any advice or suggestions would be greatly appreciated.
回答1:
After a little more research I found that microsoft offers two SDK's that you can install on the build-box and not be required to install Expression blend.
They are:
Microsoft Silverlight 4 Tools for Visual Studio 2010
http://www.microsoft.com/downloads/details.aspx?familyid=40EF0F31-CB95-426D-9CE0-00DCFABF3DF5&displaylang=en
Microsoft® Silverlight™ 4 SDK http://www.microsoft.com/downloads/details.aspx?familyid=55B44DA3-E5DE-4D2A-8EAF-1155CA6B3207&displaylang=en
Depending upon your output desktop app vs. silverlight you have the ability to install the expression libraries which will allow your solution to successfully compile.
I did refrain from the creation of the lib directory you loose all ability to version the assemblies in any sane manner.
回答2:
Microsoft provides a redistributable installer for those Blend assemblies as part of Blend SDK. Install it and you will not need Blend itself to build the solution.
来源:https://stackoverflow.com/questions/3396616/how-to-compile-an-expression-blend-solution-in-visual-studio