| |

VerySource

 Forgot password?
 Register
Search
View: 752|Reply: 7

Assembly error

[Copy link]

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-3-22 10:30:01
| Show all posts |Read mode
I added a new class to a project today, and then call the method inside it. System.TypeLoadException: Failed to load the type DataAccessObject.Class3 from the assembly DataAccessObject, Version = 1.0.2551.30557, Culture = neutral, PublicKeyToken = null .
-------------------------
It's not wrong to use the previous ones, everything is new. What's going on ~~~~~~~~~~~
Reply

Use magic Report

0

Threads

119

Posts

67.00

Credits

Newbie

Rank: 1

Credits
67.00

 China

Post time: 2020-6-29 17:45:01
| Show all posts
It is recommended to try to clean up the project!
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-6-29 20:30:01
| Show all posts
Delete all dll. and regenerate it.
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-6-30 12:15:01
| Show all posts
The dll has been deleted
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-6-30 19:30:02
| Show all posts
Is there any way
Reply

Use magic Report

0

Threads

8

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-6-30 19:45:01
| Show all posts
You modified the class project, vs.net failed to reflect the latest changes in winApp. The possible reason is that vs.net believes that the class has not changed. If it is a strong name, this problem does not exist. You can clean the solution or delete all files in the obj directory.
  TypeLoadException occurs when the type information is generated, and an exception may occur when a static variable instance is generated. Because type information and static construction are run by independent system threads, your code cannot catch exceptions. The only place in the code that can catch this exception is in the AppDomain.UnhandledException event
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-2 21:45:01
| Show all posts
clean solution------------What does this mean and how to do it, I deleted the content in obj, it is useless
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-3 10:45:01
| Show all posts
It was found out that the same file name appeared in different class projects. .net will not give any prompts, and simply do not compile and use the original one.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list