Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Exception Visual Studio/Expression-远程异常_Exception_Visual Studio 2012_Geolocation_Expression Blend - Fatal编程技术网

Exception Visual Studio/Expression-远程异常

Exception Visual Studio/Expression-远程异常,exception,visual-studio-2012,geolocation,expression-blend,Exception,Visual Studio 2012,Geolocation,Expression Blend,使用地理位置创建WP7项目时,VS2012 UI设计器会引发以下错误: Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteException Could not load file or assembly 'LocationService.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e' or one of its dependen

使用地理位置创建WP7项目时,VS2012 UI设计器会引发以下错误:

Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteException
Could not load file or assembly 'LocationService.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e' or one of its dependencies. System could not find the specified file.
   in System.Device.Location.GeoCoordinateWatcher.Dispose(Boolean disposing)
   in System.Device.Location.GeoCoordinateWatcher.Finalize()
我搜索了整个谷歌和StackOverflow,没有发现任何有用的东西。如果我重新加载设计器,它将在Visual Studio 2012中工作一两分钟。但是,如果我尝试打开项目,Expression Blend会立即崩溃

这是我的一个页面的内容(但无论内容如何,每个页面都会崩溃):


有什么想法吗


提前谢谢

我也有同样的问题。为了解决这个问题,我做了如下的事情:

 if (!ViewModelBase.IsInDesignModeStatic)
 {
     _watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High) { MovementThreshold = 5 };
 }
[更新]
这是MVVM轻型解决方案。您可以通过检查System.ComponentModel.DesignerProperties.IsInDesignTool来检查是否处于设计模式,您的页面上有什么?你能发布一些xaml和代码来帮助定位问题吗?当然,我用一个页面的内容编辑了我的文章(基本上只是一个占据整个页面的地图)。我不能用你的代码在VS designer或Expression Blend中重现错误。它装载得很好。你能确认一下吗;您已安装最新的visual studio update(),并且正在为Windows Phone的正确版本引用正确的DLL。我的DLL信息如下:名称:Microsoft.Phone.Controls.Maps路径:C:\Program Files(x86)\Microsoft SDK\Windows Phone\v7.1\Libraries\Silverlight\Microsoft.Phone.Controls.Maps.DLL运行时版本:v2.0.50727版本:7.0.0.0Hmm,我正在引用此DLL:C:\Program Files(x86)\Microsoft SDK\Windows Phone\v7.1\Libraries\Silverlight\Microsoft.Phone.Controls.Maps.dll运行时:v.2.0.50727版本7.0.0.0似乎与您的版本完全相同。。。我将检查VS更新!你认为它可能是隐藏在C代码中的东西吗?不,同样的问题,即使在更新之后…谢谢你的回复!嗯,我似乎找不到ViewModelBase,这是从哪里来的/
 if (!ViewModelBase.IsInDesignModeStatic)
 {
     _watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High) { MovementThreshold = 5 };
 }