VS2010 SilverLight4编译开源项目 ESRI Silverlight API Contrib


为了实现ArcGIS API for Silverlight加载本地Shapefile用到开源的项目:http://esrislcontrib.codeplex.com/中的Vishcious.ArcGIS.SLContrib,在vs2010和Silverlight编译时出现错误。

1)错误  2       命名空间“System”中不存在类型或命名空间名称“Concurrency”。是否缺少程序集引用?

解决方法添加位于sllib下Ex文件夹中的所有dll。

System.CoreEx.dll

System.Interactive.dll

System.Observable.dll

System.Reactive.dll

2)错误 1 预定义的类型“System.Object”未定义或未导入

解决方法http://tianmoboping.blog.163.com/blog/static/15739532201083011316802/

 

Removing certainreferenced assemblies from a Silverlight 4 Application project in Visual Studio2010 means they can't be readded and therefore the project will never compile.

It seems that if you remove the reference to mscorlib or System.Core (may beothers too?), which Visual Studio processes just fine, if you then try to readdthe references, they do not reappear as references. There is no visible error,they just aren't referenced by the project.

As a consequence the error "Predefined type 'System.Object' is not definedor imported" is reported by the compiler. This can only be resolved byadding the reference by manually editing the csproj file:closing/reopening/refreshing/cleaning the project doesn't seem to have anyeffect.

大概意思是说引用里面mscorlib 或System.Core被删了,你手工加上这个引用也没用。加不进去。怎么办呢。让你用记事本打开csproj文件。在里面加一行即可:

 

参考资料:

http://connect.microsoft.com/VisualStudio/feedback/details/519214/silverlight-4-application-project-remove-reference-to-mscorlib-or-system-core-and-they-cant-be-readded

 


最终编译通过……


你可能感兴趣的:(api,application,concurrency,silverlight,reference,2010)