Can I store resources and Windows Forms in a Visual Studio Shared Project?

86 views Asked by At

I've got ProjectA. It has a WinForm and some .resx files in it. I created a Shared Project (ProjectA-shared) and moved everything to it. ProjectA references ProjectA-shared.

When I compile the Solution with VS2013 and the Shared Project plug-in, I get the following exception when running the app:

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Foo.Controls.MyForm.resources" was correctly embedded or linked into assembly "Foo" at compile time, or that all the satellite assemblies required are loadable and fully signed.

When I compile the Solution with VS2015, everything is OK.

I am now left wondering:

  1. Why would there be a difference between the VS2013 and VS2015 outputs?

  2. It looks like .resx and WinForms aren't a natural fit for 'Shared Projects': what is the best way to share this kind of thing between two projects (primarily, projects using Shared Project just so that they can target .NET 4 and 4.5)

0

There are 0 answers