Sign in to follow this  

[.net] Linking Files = Errors

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have two projects in a solution that link to common files. One of the projects runs fine, but the other one gives an error when it tries to load a resource:
Quote:
An unhandled exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll Additional information: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "Form1.resources" was correctly embedded or linked into assembly "link2". baseName: Form1 locationInfo: link2.Form1 resource file name: Form1.resources assembly: link2, Version=1.0.1722.33346, Culture=neutral, PublicKeyToken=null
at the line:
Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Image)



What it seems to be doing is creating a .resources file under the first project's namespace for both the first project and the second project. Can anyone help me with this problem?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
i cant help u in that...but i can tell an alternative way...

just create a folder in ur project using the solution explorer and add ur files to it (ie. cursor, bg image,...etc)...then use this to load them...


_renderTarget.Cursor = new Cursor( Assembly.GetExecutingAssembly().GetManifestResourceStream( "Game.Resources.Arrow.ico" ) );

Share this post


Link to post
Share on other sites
That might work, but I would rather use .resx files because they are a lot easier. And, how would I save my ImageLists to a file:

Me.iml.ImageStream = CType(resources.GetObject("iml.ImageStream"), System.Windows.Forms.ImageListStreamer)

Share this post


Link to post
Share on other sites

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this