首页 \ 问答 \ 我可以将Prism 5与.NET 4.6.2一起使用(Can I use Prism 5 with .NET 4.6.2)

我可以将Prism 5与.NET 4.6.2一起使用(Can I use Prism 5 with .NET 4.6.2)

我使用Visual Studio 2013并将WPF解决方案从.NET 4.5.1升级到4.6.2。

我正在使用PRISM 5库,但是我似乎在升级后得到了与使用Prism的类相关的一些构建错误,类似于:

error CS0012: The type 'System.Object' is defined in an assembly that is not
referenced. You must add a reference to assembly 'System.Runtime, 
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Prism 5应该构建并运行.NET 4.6.2吗? 像这样的链接表明Prism 5可能只支持4.5.x,但是很多谷歌让我无处可去。


I use Visual Studio 2013 and have upgraded a WPF solution from .NET 4.5.1 to 4.6.2.

I was using the PRISM 5 libraries, but I seem to be getting some build errors relating to classes using Prism after the upgrade, along the lines of :

error CS0012: The type 'System.Object' is defined in an assembly that is not
referenced. You must add a reference to assembly 'System.Runtime, 
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Should Prism 5 build and run with .NET 4.6.2? Links like this suggest Prism 5 might only support 4.5.x, but a lot of google has got me nowhere conclusive.


原文:https://stackoverflow.com/questions/42629858
更新时间:2022-05-13 20:05

最满意答案

我通过添加此行解决了此问题。

 Mat.release() 

当然,每个OpenCV Matrix对象都不再需要每个对象


I have resolved this issue by adding this line.

 Mat.release() 

to every OpenCV Matrix object at of course locations where each object was no longer needed

相关问答

更多
  • 您正在做一些副本,而是尝试将const ref保留在不会被修改的对象上。 您还可以使用std::move以避免复制。 例如,在您的代码中: Mat image = imagesToTest[indexOfImage]; 你实际上是在复制一个Mat ,在你的情况下是一个图像,因此占用了很大一部分内存。 这与代码的很大一部分相同。 请参阅此处以move数据而不是执行实际副本: 何时使用移动构造函数/分配 您还可以通过将变量“推”到最小堆栈来将变量的生命周期限制到最小。 您甚至可以创建人工堆栈来限制变量的范围。 ...
  • 你在这里打电话 Mat::Mat(const IplImage* img, bool copyData=false) 将copyData设置为true ,你能确定Mat::release()被调用吗? 如果您的refcount永远不会返回0,那么您的析构函数绝不会触发您在内存中留下大量图像数据的副本。 Here you are calling Mat::Mat(const IplImage* img, bool copyData=false) With copyData set to true, can ...
  • 绝对可以使用cv :: Mat指针,但是(和所有指针一样)你必须特别注意删除创建的对象以再次释放已分配的内存。 在您的示例代码中,不清楚在函数中返回其指针的对象是否将被删除。 如果不是这种情况,cv :: Mat像素数据的引用计数将无法按预期工作,此外,一些(次要)内存将被cv :: Mat对象本身泄露。 如此简短:对于每个new cv::Mat必须有一个delete ,所以如果外部函数中有一个new的,也许你必须为它调用一个delete (如果该函数没有通过一些智能类功能本身来做)后来)。 更具体的是, ...
  • 我找到了解决问题的方法。 解决方案是: 通过在OpenCv Camera Class中重写此方法:“createVideoPreviewLayer” 它应该是这样的: - (void)createVideoPreviewLayer; { self.parentView.layer.sublayers = nil; if (captureVideoPreviewLayer == nil) { captureVideoPreviewLayer = [[AVCaptureVide ...
  • 我相信你的opencv版本是2.4.4或更高版本。 我使用opencv 2.4.7和2.4.8遇到了同样的问题。 然后我回到2.4.3,一切顺利。 我相信这是最近opencv的一个错误。 I believe your opencv version is 2.4.4 or later. I encounter the same problem using opencv 2.4.7 and 2.4.8. Then I go back to 2.4.3 and everything goes well. I be ...
  • cv::Mat 有一个构造函数 ,您可以在其中指定用户数据: Mat::Mat(int rows, int cols, int type, void* data, size_t step=AUTO_STEP) 该文档说明了关于data参数的以下内容: 指向用户数据的指针。 采用数据和步骤参数的矩阵构造函数不分配矩阵数据。 相反,他们只是初始化指向指定数据的矩阵头,这意味着没有数据被复制。 此操作非常高效,可用于使用OpenCV函数处理外部数据。 外部数据不会自动释放,所以您应该照顾它。 cv::Mat h ...
  • 有趣: 在执行中,我复制图像并将其保存在std :: Vector列表中 这句话也是如此: 一段时间后,我得到一个内存不足错误。 OpenCV图像可能会很大,具体取决于它们的大小,根据您的说法,我认为您的矢量增长速度快,然后您可以从中删除数据 ,从而导致内存不足错误。 有道理吗? 如果您继续向向量添加数据,有一天您将耗尽内存来存储新数据。 Interesting: In the execute I copy the image and save it in a std::Vector list and th ...
  • 正如您在文档中报告的数据布局中所看到的,您可以访问以下值: for(int r=0; r
  • 我通过添加此行解决了此问题。 Mat.release() 当然,每个OpenCV Matrix对象都不再需要每个对象 I have resolved this issue by adding this line. Mat.release() to every OpenCV Matrix object at of course locations where each object was no longer needed
  • 摆脱iplimages的好主意! 看,它也变得容易了: for(size_t i = 0; i < faces.size(); i++) { Mat roi(captureFrame, faces[i]); std::stringstream sstm; sstm << "faces\\" <

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。