Community

Meadow application cannot have more then one project reference

VS Tools for Meadow [Preview]; Version 0.17.1

(All within the same solution):
1. Create multiple Meadow class library projects: Foo.dll, Bar.dll
2. Create a Meadow Application.
3. Add a project reference to Foo (life is good)
4. Add a project reference to Bar (a warning indicator will be displayed over the project reference and no code references to it are valid)

Would love to be able to reference multiple meadow library projects.

Yes, it’s definitely an issue … but if you change the Assembly Name (in Properties of the libraries so they aren’t both MeadowLibrary) and change the namespace names in .cs module to the default namespace specified in the properties (because the generated code defaults to MeadowLibrary as the namespace name too), rebuild the libraries, and you might also have to delete and re-add the project references, then you should be good-to-go. I think the primary problem is when a Meadow Library project is created, it is always given an Assembly Name of Meadowlibrary (and a namespace name of MeadowLibrary) when you have more than one of them used by a Meadow Application, only one will be accessible. in-fact, if the library assemblies all have the same name, only one can exist in a directory. Both the default assembly name and namespace name used in the generated .cs code (even though the default namespace in the properties seems correct) need to be fixed.

You nailed it! That workaround resolves it. [ I got so used to project defaults in C# I didn’t even look at that. ]

Thank you!

Happy to help … I just hope that it all gets fixed soon.