开发者

asp.net Web Reference build error

开发者 https://www.devze.com 2023-03-18 13:03 出处:网络
Anyone knows what causes the following error? The type or namespace name \'ObservableCollection\' does not exist in the namespace \'System.Collections.ObjectModel\'开发者_Go百科 (are you missing an

Anyone knows what causes the following error?

The type or namespace name 'ObservableCollection' does not exist in the namespace 'System.Collections.ObjectModel'开发者_Go百科 (are you missing an assembly reference?) c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\myweb\ea5ddc82\99690bad\App_WebReferences.7f8qgamu.0.cs

It turned out the there was a conflict with my IIS Virtual Directory. So what I did was remove the application in my IIS.


You need to reference the correct assembly in your project that uses the ObservableCllection. In the case of ObservableCollection this dll was changed from .Net 3.5 to .Net 4.

Prior to .NET 4, ObservableCollection was in WindowsBase.dll and since .Net 4 it is in System.dll. So I guess it depends on the framework version you compile against.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号