Assembly reference version guidance

I just upgraded my FEZ Domino to the code (I was using the code). This broke my assembly references for some of the GHI assemblies.

What’s the right way to handle this? If you look at the diff at [url][/url] you can see that it’s just:

I know my code works with the code, and I know that there is generally a concept in .NET of “as long as the version is kinda the same, use that assembly”. For GHI assemblies what is the right guarantee of API compatibility? That is, can I just say Version=4.1.* and be done with it?

Simply remove all assemblies from your project then add them back.

Yes, this is what I did (as per the diff).

I thought there was a more compatible way to do it than “everyone who uses my code better have the same versions of the assemblies, even though I don’t use features in the newer versions.”

That is, anyone who gets my code that doesn’t have (let’s say they have has to update their GHI code/firmware (which is probably a good idea anyway) or delete and re-add the references in my library csproj to refer to their older version, even though I don’t use any features specific to, and would work fine.

If you don’t include the GHI assemblies files in your project (output folder), I think Visual Studio will automatically get them from GHI SDK.
Delete the output folder before trying the project on another computer or SDK. It should work…

In VS2010, if you right click on your project and click Clean, VS will empty the output folder (both debug and release).

It works for me to use:

instead of

The IDE resolves the right version, but I’m not sure how this would work if there were multiple frameworks installed, but I don’t think that’s the case with most people.