embedded or linked into assembly "Microsoft.Practices.Repository"

Sep 8, 2007 at 8:25 PM
please help,

I got this error at runtime in my application (could not find any resources approriate for the specific culture or the neutral culture. Make sure "GenericResources.resources" was correctly embebbed or linked into assembly "Microsoft.Practices.Repository").

Thank you
Sep 9, 2007 at 3:23 AM
Thanks for the bug report. Did you get a stack trace by any chance? This would make things a lot easier to track down.

-Chris


Sep 10, 2007 at 2:04 PM
I have the same error even thru "GenericResources.resx" is embedded into the assembly...

it happens when

throw new RepositoryFailureException(ex);

public RepositoryFailureException(Exception inner)
: base(string.Format(CultureInfo.CurrentCulture, GenericResources.DefaultMessage), inner)
{
}

Sep 10, 2007 at 4:17 PM
thank rfcdejong, I was going to post the error :).

anyway, whenever the GenericResources object is being used. it's throw the expection.

thank you
Developer
Sep 14, 2007 at 10:23 AM
Edited Sep 15, 2007 at 1:10 AM
Damn, i got this error as well.

The problem is the MissingManifestResourceException

The problem lies in the ResXFileCodeGenerator
As mentioned in the ResXFileCodeGeneratorEx homepage
The strongly typed resource classes generated by the ResXFileCodeGenerator custom tool always have internal visibility. Since the generated class is marked as internal, it cannot be accessed from assemblies other than friend assemblies.
Sep 14, 2007 at 3:18 PM
Ditto here, using release 9741 and just started testing the Add (insert) functionality.
Up until now we've been testing the "Gets" and it has been fine.
Sep 18, 2007 at 10:45 AM
hmm..

Is this the solution to make the class public with resgen?
Maybe programmaticaly change internal to public?

However, the resgen.exe utility with the /publicClass option generates a strongly typed resource class as a public class, but then all advantages of custom tools are lost in this case.
Oct 12, 2007 at 1:15 PM
I can't get $#! rid of this error, i did my best trying to solve and i nearly wasted 3 hours on it.

The "ResXFileCodeGeneratorEx" isn't the solution :(
Developer
Oct 12, 2007 at 2:04 PM
I'' try to look into it this weekend, if I get it to work ill post some new source.

Benny
Developer
Oct 13, 2007 at 9:19 PM
Edited Oct 13, 2007 at 9:19 PM
This is now fixed in changeset 12356.

The problems solution is described in the article kb839861.

Had to prefix GenericResources with its namespace to get it right. Undocumentet feature? This doesnt work in the template-generated delete, add, update and select. Added a new Exception to the Repository and changed throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, GenericResources.InvalidParameterName), dbParameter); to throw new RepositoryInvalidParameterException(dbParameter); to fix this.

Hope this fixes your problems.

Have a nice weekend all.

Benny
Oct 15, 2007 at 5:11 PM
Benny,

I pulled the new source drop, and went to compile it (like I've done before), but got an warnings and errors during building of the DataAccessGuidancePackage:

Error 12 The type 'Microsoft.WizardFramework.WizardPage' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.WizardFramework, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. C:\Data\Projects\RepositoryFactory-12356\Trunk\Source\Data Access Guidance Package\Data Access Guidance Package\CustomPages\ConnectionCP.Designer.cs 3 19 DataAccess Guidance Package

By expanding the references of the project, there is a bang on the Microsoft.WizardFramework reference.

Curt
Austin, TX
Developer
Oct 15, 2007 at 7:25 PM
Curt,

I had some problems with the referenced assembly too, @ work i use XP prof 64-bits and @ home i use Windows 2003 Server (32-bits). I looks like the Microsoft.WizardFramework dosnt get registered in the GAC. So everytime i open the solution at the other place then i last checked in, i have to change the reference to get it to build.

Since my last check-in was @ home i believe you are running the XP or Vista 64-bits version. You then have just to add a reference to c:\Program Files(x86)\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\Microsoft.Practices.WizardFramework.dll. Then you should get it all to build.

If this shouldn't get the job done, i think we have to do something quite different to get the source to compile @ with different systems.

Benny
Stavanger, Norway

Oct 15, 2007 at 8:39 PM
Arghh.. still having issues with it. With the reference correctly "referenced" (no yellow bang), I'm still getting the error listed above. XP OS. It's very strange. If I remove the reference completely, I get 41 compile errors (which I would expect). When I add it back in, I only get the one listed above, and only on the file ConnectionCP. Looks like it inherits from CustomWizardPage, which in turn instantiates the WizardPage.

It seems like it would be all-or-nothing... Either all of the references would work, or none of them, unless the version of the Microsoft.Practices.WizardPage that I'm using is out-of-date. But, I don't see anything that points to a more recent version, or any downloadable version of it anywhere....

Curt
Austin, TX

Developer
Oct 15, 2007 at 9:02 PM
Which version is your version? It should be 8.0.0.0. Check the propertysheet to see what version you are using.

Benny
Oct 16, 2007 at 8:22 AM
Replaced all the "throw new ArgumentException" with "throw new RepositoryInvalidParameterException"
I have like 50 factory's, but find and replace works fine ;)

Build successfull.

Lets hope it works fine now, but i got a good feeling about it.
Oct 16, 2007 at 4:04 PM
Okay, I got it working now. I'm not quite certain exactly what I did, but now it works...

Phew...

Curt
Austin, TX