Dependent DLL is not getting copied to the build output folder in Visual Studio

I have a visual studio solution. I have many projects in the solution. There is one main project which acts as the start up and uses other projects. There is one project say “ProjectX”. Its reference is added to main project. The ProjectX references another .NET dll (say abc.dll) that isn’t part of the solution. … Read more

How come a non-const reference cannot bind to a temporary object?

Why is it not allowed to get non-const reference to a temporary object, which function getx() returns? Clearly, this is prohibited by C++ Standard but I am interested in the purpose of such restriction, not a reference to the standard. struct X { X& ref() { return *this; } }; X getx() { return X();} … Read more

What are Rust’s exact auto-dereferencing rules?

I’m learning/experimenting with Rust, and in all the elegance that I find in this language, there is one peculiarity that baffles me and seems totally out of place. Rust automatically dereferences pointers when making method calls. I made some tests to determine the exact behaviour: struct X { val: i32 } impl std::ops::Deref for X … Read more

Referencing a string in a string array resource with xml

I have preferences where you can enable/disable what items will show up on the menu. There are 17 items. I made a string array in values/arrays.xml with titles for each of these 17 items. I have preferences.xml which has the layout for my preferences file, and I would like to reference a single item from … Read more

MSBuild doesn’t copy references (DLL files) if using project dependencies in solution

I have four projects in my Visual Studio solution (everyone targeting .NET 3.5) – for my problem only these two are important: MyBaseProject <- this class library references a third-party DLL file (elmah.dll) MyWebProject1 <- this web application project has a reference to MyBaseProject I added the elmah.dll reference to MyBaseProject in Visual studio 2008 … Read more

Are arrays in PHP copied as value or as reference to new variables, and when passed to functions?

1) When an array is passed as an argument to a method or function, is it passed by reference, or by value? 2) When assigning an array to a variable, is the new variable a reference to the original array, or is it new copy? What about doing this: $a = array(1,2,3); $b = $a; … Read more

Could not load file or assembly or one of its dependencies

I’m having another of these “Could not load file or assembly or one of its dependencies” problems. Additional information: Could not load file or assembly ‘Microsoft.Practices.Unity, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) I have no idea what is … Read more

Getting “type or namespace name could not be found” but everything seems ok?

I’m getting a: type or namespace name could not be found error for a C# WPF app in VS2010. This area of code was compiling fine, but suddenly I’m getting this error. I’ve tried removing the Project Reference and the using statement, shutting VS2010 and restarting, but still I have this issue. Any ideas why … Read more