After upgrading to .NET 4.8 system Class libraries are not loading in VS 2019

Kamayani 1 Reputation point

Hi All,

I am facing Class libraries are not loading issue as I have upgraded .NET framework to 4.8 and tried to open that solution in Visual studio 2019 and getting below error ...

' The type or namespace name 'ScriptObject' could not be found (are you missing a using directive or an assembly reference?) '

Could anyone please help me?

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,116 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 47,461 Reputation points

    What do you mean by it is not loading? The message you posted indicates that the project was loaded and then the compilation ran and identified a compiler error. This can happen if you're using NuGet packages and the packages haven't been fully downloaded yet. Doing a rebuild generally solves the issue.

    If this is a compiler error then upgrading .NET wouldn't have impacted that as the compiler would behave the same. Posting the code would be useful.

  2. Michael Taylor 47,461 Reputation points

    There is no ScriptObjectAttribute in .NET that I'm aware of. This code is using a third party library and the references doesn't show that you have any third party assemblies referenced. This would have nothing to do with upgrading .NET Framework.

    What NuGet packages are you referencing? A quick google for either ScriptObjectAttribute or ScriptNameAttribute only show a reference to a Script# which takes C# and compiles to Javascript. If you're using something like that then I recommend you go to their Github page for help. There are indications you need a VS extension and libraries before it'll work. Again, nothing that should just suddenly break because of a .NET upgrade.

    0 comments No comments