I have a project "ProjA" which wraps up references to several other projects and some 'plugin' assemblies. All of those references have Copy Local set to 'True'. Note that the code in the plugin assemblies (which are project references) is not referred to in "ProjA" directly, but is loaded and located through DI/Ninject. (So I'm using these project references as a way of getting the plugin assemblies into the output folder, see below for why)
I also have project "ProjB", which references ProjA. It invokes ProjA code which should do it's thing, using the referenced plugin assemblies.
The problem is, it doesn't work. The plugin assemblies are not copied down from the ProjA output folder (which they are 'copied local'-into) into the ProjB output folder. So Ninject doesn't load them, and the thing fails.
So my two questions:
I have also considered and played with post-build steps for either the plugin projects (not ideal: I am pulling them into this new solution from another, if I add post-build steps it will likely screw up the other solution) or the project which depends on them (which is OK, but an XCopy with relative paths, and having to manually set up Project Dependencies.. seems more hacky again).
Is there something I'm missing, any ideas at all? If Copy Local chained across project references it would fit perfectly..
似乎无法使用Visual Studio或msbuild。
Copy local = true is the source of all VS evils. Well, most at least.
I'd go with just saying - don't use it. Have one nice outputdir, like T:\\Bin, and copy everything you need using post build scripts to that dir. And run from there. Don't just put your trust in VS and walk around like a blind mice.
You may also consider using the GAC.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.