Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7490059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:32:45+00:00 2026-05-29T15:32:45+00:00

I have upgraded a C# WinForms application from Visual C# 2008 (framework 3.5) to

  • 0

I have upgraded a C# WinForms application from Visual C# 2008 (framework 3.5) to 2010 (framework 4.0) and I’m getting runtime errors.

The application loads assemblies dynamically at runtime using Assembly.Load(filename). It is designed this way because depending on the users configuration it should load different implementations of the assembly located in different folders.

Everything works fine, except when the loaded dll has got embedded resources (bitmaps or xsd-datasets) then I get FileNotFoundException:

{“Could not find file ‘FF.Fi_Stat.SKA.resources’.”:null}

The assembly is called FF.Fi_Stat.SKA.dll. I do not understand this message because there are no external resources (only embedded ones) and no file with that name is generated by VS in the output directory. Any ideas?

—

More details:

This is how I load the assembly:

Assembly a = Assembly.LoadFile(assemblyFileName);

The actual loading of the assembly works, it is when I try to create an instance of a class inside the assembly that the exception occurs:

Type t = a.GetType("nameofclass");
Activator.CreateInstance(t);  //fails here

Here is the stack trace:

Exception has been thrown by the target of an invocation.
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   ...

The inner exception stack trace:

   at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark)
   at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark)
   at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
   at System.Resources.ResourceManager.GetString(String name)
   at FF.Fi_Stat.SKA.RegForm.InitializeComponent()
   at FF.Fi_Stat.SKA.RegForm..ctor()

I now realize that the dll’s that don’t work has this line in InitializeComponent in common:

System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RegForm));

However as I mentioned this was no problem with framework 3.5.

—

SOLUTION FOUND

I found out that the problem was related to how the dotnet framework tried to find localized resources and after I added the following line to AssemblyInfo.cs in my assemblies it started working again.

[assembly: NeutralResourcesLanguageAttribute("sv-SE", UltimateResourceFallbackLocation.MainAssembly)]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T15:32:46+00:00Added an answer on May 29, 2026 at 3:32 pm

    SOLUTION FOUND

    I found out that the problem was related to how the dotnet framework tried to find localized resources and after I added the following line to AssemblyInfo.cs in my assemblies it started working again.

    [assembly: NeutralResourcesLanguageAttribute("sv-SE", UltimateResourceFallbackLocation.MainAssembly)]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have upgraded a MS Visual Studio Application from VS 2003 to VS 2008
I have upgraded one of my projects in c# from visual studio 2005 to
In a current C# application I do maintenance on, we have upgraded to Visual
I have just upgraded our company's domain controller from NT 4.0 to Windows 2008
I have upgraded from SQL Server 2005 to 2008. I remember that in 2005,
I have had Visual Studio Team System 2008 and I have upgraded it to
I have just upgraded my server 2003 to serrver 2008. As I write this,
I have successfully upgraded an MFC application which was compiled with an old version
I have an application that was started in C# 1.0 using Visual Studio .NET.
I have created a c# 2.0 WinForm application which loads dlls, searches for an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.