I have a solution with a couple of projects. Some(2) of these projects are setup projects. Whenever I open the solution I get errors like the following:
Error 16 Unable to find source file 'Z:...\Remotion.Data.Linq.dll' for assembly 'Remotion.Data.Linq.dll', located in '[TARGETDIR]' Z:...\CirrusNodeServiceSetup.vdproj CirrusNodeServiceSetup
These errors can be made to go away by either doing a build or by 'touching'(with my mouse) the dependencies folders in the setup projects.
Is there any way to make this weird behavior stop?
To display the Error List, choose View > Error List, or press Ctrl+\+E.
Choose Rebuild Solution to "clean" the solution and then build all project files and components. Choose Clean Solution to delete any intermediate and output files. With only the project and component files left, new instances of the intermediate and output files can then be built.
Yes there's clearly a way. Don't reference libraries from your disk folders or network places.
The right approach is to create a "Dependencies" folder (call it whatever you like) in the same place as where your solution file is. Copy in that folder every external resource and reference it from there.
Then remember to add that new folder and everything you will put in there to your versioning (SVN, HG, etc) so when the sources will be extracted to another machine, all the required dependencies will be there.
EDIT: just to be clear, this applies to libraries that are not part of the net framework, meaning they are not in the GAC. You should always reference CLR libraries from the GAC.
Removing the Read-Only attribute on the setup project's source folder fixed it for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With