Click here to Skip to main content
15,888,148 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
first of all, I don't know if it is feasible but I would say that once the limits of the framework have been overcome, it should be.
Below the details of the issue I'm facing, thanks in advance to anyone who might help.

I have a solution with the following projects:
- windows multithread service (main project) -> .Net Framework 4.6.1 c#

- 2 libraries -> .Net Framewrok 4.6.1 -> vb.net

- WS with Kestrel (therefore not iis) -> .Net Core 2.1 c# (which I would like to compile as a library)
NOTE: the project works if opened as standalone.

Basically, Windows service should start several threads and one of the threads should be the WS Kestrel.
When I try to add the WS reference to a dll, it says that the 2 frameworks are incompatible.

What I have tried:

I therefore made the following test:
- WS with Kestrel -> .Net Standard 2.0 c # (ie the converted .Net Core)
NOTE: since .Net Standard is compiled as a library, I cannot test it stand alone.

It is compiled.
I add it to the solution and fill it out.
I put in the WS as a reference in a library and compile.
I recall the WS main (with a separate thread) without errors.
BUT I CANNOT CONSUME IT.

My questions are:
A) Is the second solution with ws with .NET Standard target framework feasible?
B) can the first solution with the ws with .NET Core target framework be added as a reference to the DLL in any way? maybe with a supplementary .Net Standard project?
C) more generally is it a feasible thing to start a thread like WS?
Posted
Updated 12-Mar-19 9:14am

1 solution

You're essentially "crossing the streams", and .Net is gonna complain. Welcome to Microsoft's newest forced incompatibility infrastructure.

If it were me, I would get refactor the web service to use .Net Framework instead of .net Core (it honestly shouldn't be difficault to do), and get on with your day.
 
Share this answer
 
Comments
jump_75 13-Mar-19 5:07am    
You have gotten the gist perfectly.
Unfortunately, I'm not very familiar with web services, I'm not sure how to move. I have already tried to convert the .Net Core project into .Net Framework but I lose some important references and I can't solve the problem while with .Net Core the stand alone project works correctly.
I will try again to use the .Net Framework. Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900