Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find type System.Runtime.InteropServices.StandardOleMarshalObject in module System.dll C#

I tried to run my UWP project and it came out this error, where previously I run it was able to run smoothly. I don't know where the error is as it didn't show.

Cannot find type System.Runtime.InteropServices.StandardOleMarshalObject in module System.dll

I searched around the internet and know that it might be the reference problem, here are the reference list that I have used:

Analyzers

Microsoft .NETCore.UniversalWindowsPlatform

MongoDB.Driver

Newtonsoft.Json

System.Windows.Forms

TweetinviAPI

Universal Windows

My application is about getting data from Twitter via TweetinviAPI and store them into Mongo database. Then analyze the data in terms of finding what they means. Also I'm using the latest Windows 10 Fall Creators Update so that the UWP would support .NET Standard 2.0, so I guess that's not the problem.

Thanks.

like image 377
Corene Avatar asked Oct 19 '25 22:10

Corene


1 Answers

System.Windows.Forms is not supported in UWP. Remove this dependency and refactor all code which depends on it.

like image 157
Jacek Blaszczynski Avatar answered Oct 22 '25 11:10

Jacek Blaszczynski