.netvisual-studiosystem.reactivevisual-studio-2015

A reference to 'YourProject' could not be added. An assembly must have a 'dll' or 'exe' extension in order to be referenced


When I attempt to add a reference to a class library type project within the same solution, I get a message box saying:

A reference to 'YourProject' could not be added. An assembly must have a 'dll' or 'exe' extension in order to be referenced.

I am using Visual Studio Community Edition 2015 on 64-bit Windows 7 Home Premium and all my projects, the one I am trying to set a reference to as well as the one I am trying to set a reference from target .NET Framework v4.

Update

I am adding some more context. Here is what happened.

I downloaded the source of Rx.NET and when I opened the solution file, it first warned me with a dialog box asking me if I trusted the source from which I had downloaded this solution, and if it wanted me to proceed. I clicked Yes, go ahead for each of the 17 projects in the solution.

enter image description here

Now, when I look at the project references, they are all screwed up in all of the projects. None of them have their references resolved.

When I try to manually set the reference again using the Add Reference dialog, and by selecting the project from the Solution -> Projects section, I get a dialog box with the message I mentioned earlier.

Further Update

It seems like the problem is the missing assemblies namely Microsoft.Threading.Tasks, Microsoft.Threading.Tasks.Extensions, and Microsoft.Threading.Tasks.Extensions.Desktop. I have no idea where to get them from or if they even exist anymore or if they have been merged into some other existing assembly since the the latest stable release v2.2.5 of Rx source code was shipped.


Solution

  • (Too long for a comment)

    The Rx code base is a funny beast. Older versions of the code base (2.2.3) were not very friendly to build locally. First I would suggest running on a recent OS (win7 is not under mainstream support anymore and you have days left before the free upgrade to Win10 expires). Then ensure you have the latest .NET SDK's installed. You may also have to be careful as to which Build target you are running. DEBUG and RELEASE from memory don't build in Rx.NET. You need to pick a target like DEBUG40 or RELEASE81 which will define the platform you are building for. Finally I would suggest building the Rx code base as it came, and then referencing that from your console app in another solution, again just due to the peculiar way the Rx code base has been structured (for platform support)