在ASP.NET Core 1.0中无法访问System.Messaging/MSMQ

编程入门 行业动态 更新时间:2024-10-13 02:19:28
本文介绍了在ASP.NET Core 1.0中无法访问System.Messaging/MSMQ的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我一直在尝试使用MVC 6和其他一些较新的Web开发工具(Angular 2.0等),并且在设置使用MSMQ的网页时遇到了一些问题.作为参考,我使用的是VS2015 Update 2,我相信它仍然是RC1.

I've been playing around a bit with MVC 6 and a few other of the newer web development tools (Angular 2.0, etc.) and I've run into a bit of a problem setting up a webpage that utilizes MSMQ. For reference, I'm using VS2015 Update 2, which I believe is still RC1.

当我第一次尝试弄乱System.Messaging时,它总是遇到Nuget软件包的问题(这是Update 2的错误,它需要更新Nuget服务),并且不会正确地引用该软件包.在玩了更多之后,我最终引用了该软件包(必须在解决方案资源管理器中手动进行处理),而Visual Studio最初检测到的任何错误似乎都可以解决.现在,我在构建时遇到错误,指出它找不到对System.Messaging的引用.我不确定这是我的解决方案有问题还是VS2015遇到问题.

When I first tried to mess with System.Messaging in general, it kept having issues with Nuget Packages (which was a bug with Update 2, it required an update to the Nuget service) and wouldn't reference the package properly. After playing with it some more, I eventually got the package referenced (had to do it manually in my solution explorer) and any errors Visual Studio originally would have detected seemed to be resolved. Now, I get errors on build stating that it can't find a reference (to System.Messaging). I'm not sure if this is an issue with my solution or if it is something that VS2015 is having issues with.

从我读到的内容(我来自WCF)来看,MVC 6是处理此类情况的一种更好的方法,因此我尝试进行切换,但这使我完全陷入了困境.

From what I've read (I'm coming from WCF), MVC 6 is a much better way to handle these sort of situations so I'm trying to make the switch but this has me completely dead in my tracks.

如果需要在MVC 6/ASP.NET Core 1.0中执行消息队列的任何特定方式,我没有找到它,因此,对此的任何消息来源或建议,我们将不胜感激.

If there is any specific way I need to do messaging queues in MVC 6/ASP.NET Core 1.0 I have not found it, so any sources or advice on this is greatly appreciated.

推荐答案

除非您特别需要使用核心DNX定位多平台,否则仍可以使用MVC6和DNX的所有新功能来编写您的应用,但仍以经典的完整.Net 4.5.1(或您需要的任何版本)为目标.

Unless you specifically need to target multiplatform with the core DNX, you could still write your app with all of the new hotness features of MVC6 and the DNX, but still target the classic full .Net 4.5.1 (or whatever version you need).

打开您的project.json文件并找到它的框架"部分,然后删除对"dnxcore50"的引用,以便最后一部分成为以下内容.

Open your project.json file and find the "frameworks" portion of it, and remove the reference to "dnxcore50" so that the final section becomes the following.

"frameworks": { "dnx451": { }, },

到那时,您应该可以引用System.Messaging了.

At that point you should be able to reference System.Messaging without issue.

更多推荐

在ASP.NET Core 1.0中无法访问System.Messaging/MSMQ

本文发布于:2023-11-06 08:22:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1563179.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法访问   Core   ASP   NET   MSMQ

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!