When working on a VS project that involves referencing Microsoft.SharePoint.dll, building the project causes Microsoft.SharePoint.Search.dll to be copied to my bin folder. Why is this? Okay, maybe it's just a bug, but I want to know the mechanism. (Thanks to SO, I know how to prevent this from happening, but I still want to find out why it happens in the first place.)
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
I believe this happens because Microsoft.SharePoint.dll uses it as a dependency. As Microsoft.SharePoint.Search.dll is not in the GAC, Visual Studio copies it to the bin folder. |
|||||||||
|
|
Alex is correct, if you want to stop this happening you can use this hack:
This makes it easier when you want to do post build events like coping DLL around. |
|||
|
|
If it works for you, try putting a build event in your project. Right click the project in Solution Explorer, click Properties, and then go to the Build tab. In Post Build events, put the text: cd $(ProjectDir) del bin\Microsoft.SharePoint.Search.dll del bin\Microsoft.SharePoint.Search.xml This will delete the files after every build. |
||||
|
|