System.Messaging/MSMQ not accessible in ASP.NET Core 1.0
Asked Answered
C

1

2

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.

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.

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.

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.

Carpo answered 19/4, 2016 at 14:30 Comment(0)
S
2

Unless you specifically need to target multiplatform with the .net 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).

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": { },
 },

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

Symbolic answered 19/4, 2016 at 14:44 Comment(1)
Hey, this worked wonders! I had not idea that it was trying to build it for multiple platforms. I don't need it for Unix/Linux systems, so this works out okay. However, if I did need to do so in the future, is there any technology out there that could do this? Or is it a wait and see scenario?Carpo

© 2022 - 2024 — McMap. All rights reserved.