Compiling .net core DLL as a .net framework DLL












0















So, im writing a game Client/Server that shares 1 project.



The server is written using .net CORE, and the client needs the library to be in .net framework, so ive added a "Commons" project that builds in .net framework 3.5



However, for that reason, the server won't natively run on linux.



I was wondering, googled a bit couldn't find an actual way of doing it, but making "Commons" project a .net CORE project, but also make it possible to build his DLL in .net framework to import in the game client.



So the server would use a .net CORE version, and the Client would use a .net framework version of the same library.



Would that be possible somehow ?



Thanks for any attention !










share|improve this question























  • Please specify the versions of .NET and .NET Core that are in use. The only version number you've provided is that you're currently building the common library against .NET 3.5... it's very likely that you should target .NET Standard instead, but we can't tell for sure without knowing the platform versions that need to consume the library.

    – Jon Skeet
    Nov 13 '18 at 14:50











  • I can target the .net framework from 2 to 3.5 The .net core version im using netcoreapp2.1

    – Gabriel Slomka
    Nov 13 '18 at 14:52











  • Should I target .net standard in the common library ? Would it work as .net core for the server ? (runs in Linux)

    – Gabriel Slomka
    Nov 13 '18 at 14:52











  • Given your comment about Unity, it sounds like you should probably try to update to newer versions of Unity that support more recent versions of .NET. Trying to use .NET Core (very modern) with .NET 3.5 (10 years old) is bound to be painful. (But I would strongly urge you to give all of this information in your question.)

    – Jon Skeet
    Nov 13 '18 at 15:47
















0















So, im writing a game Client/Server that shares 1 project.



The server is written using .net CORE, and the client needs the library to be in .net framework, so ive added a "Commons" project that builds in .net framework 3.5



However, for that reason, the server won't natively run on linux.



I was wondering, googled a bit couldn't find an actual way of doing it, but making "Commons" project a .net CORE project, but also make it possible to build his DLL in .net framework to import in the game client.



So the server would use a .net CORE version, and the Client would use a .net framework version of the same library.



Would that be possible somehow ?



Thanks for any attention !










share|improve this question























  • Please specify the versions of .NET and .NET Core that are in use. The only version number you've provided is that you're currently building the common library against .NET 3.5... it's very likely that you should target .NET Standard instead, but we can't tell for sure without knowing the platform versions that need to consume the library.

    – Jon Skeet
    Nov 13 '18 at 14:50











  • I can target the .net framework from 2 to 3.5 The .net core version im using netcoreapp2.1

    – Gabriel Slomka
    Nov 13 '18 at 14:52











  • Should I target .net standard in the common library ? Would it work as .net core for the server ? (runs in Linux)

    – Gabriel Slomka
    Nov 13 '18 at 14:52











  • Given your comment about Unity, it sounds like you should probably try to update to newer versions of Unity that support more recent versions of .NET. Trying to use .NET Core (very modern) with .NET 3.5 (10 years old) is bound to be painful. (But I would strongly urge you to give all of this information in your question.)

    – Jon Skeet
    Nov 13 '18 at 15:47














0












0








0








So, im writing a game Client/Server that shares 1 project.



The server is written using .net CORE, and the client needs the library to be in .net framework, so ive added a "Commons" project that builds in .net framework 3.5



However, for that reason, the server won't natively run on linux.



I was wondering, googled a bit couldn't find an actual way of doing it, but making "Commons" project a .net CORE project, but also make it possible to build his DLL in .net framework to import in the game client.



So the server would use a .net CORE version, and the Client would use a .net framework version of the same library.



Would that be possible somehow ?



Thanks for any attention !










share|improve this question














So, im writing a game Client/Server that shares 1 project.



The server is written using .net CORE, and the client needs the library to be in .net framework, so ive added a "Commons" project that builds in .net framework 3.5



However, for that reason, the server won't natively run on linux.



I was wondering, googled a bit couldn't find an actual way of doing it, but making "Commons" project a .net CORE project, but also make it possible to build his DLL in .net framework to import in the game client.



So the server would use a .net CORE version, and the Client would use a .net framework version of the same library.



Would that be possible somehow ?



Thanks for any attention !







.net .net-core






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 14:47









Gabriel SlomkaGabriel Slomka

4511316




4511316













  • Please specify the versions of .NET and .NET Core that are in use. The only version number you've provided is that you're currently building the common library against .NET 3.5... it's very likely that you should target .NET Standard instead, but we can't tell for sure without knowing the platform versions that need to consume the library.

    – Jon Skeet
    Nov 13 '18 at 14:50











  • I can target the .net framework from 2 to 3.5 The .net core version im using netcoreapp2.1

    – Gabriel Slomka
    Nov 13 '18 at 14:52











  • Should I target .net standard in the common library ? Would it work as .net core for the server ? (runs in Linux)

    – Gabriel Slomka
    Nov 13 '18 at 14:52











  • Given your comment about Unity, it sounds like you should probably try to update to newer versions of Unity that support more recent versions of .NET. Trying to use .NET Core (very modern) with .NET 3.5 (10 years old) is bound to be painful. (But I would strongly urge you to give all of this information in your question.)

    – Jon Skeet
    Nov 13 '18 at 15:47



















  • Please specify the versions of .NET and .NET Core that are in use. The only version number you've provided is that you're currently building the common library against .NET 3.5... it's very likely that you should target .NET Standard instead, but we can't tell for sure without knowing the platform versions that need to consume the library.

    – Jon Skeet
    Nov 13 '18 at 14:50











  • I can target the .net framework from 2 to 3.5 The .net core version im using netcoreapp2.1

    – Gabriel Slomka
    Nov 13 '18 at 14:52











  • Should I target .net standard in the common library ? Would it work as .net core for the server ? (runs in Linux)

    – Gabriel Slomka
    Nov 13 '18 at 14:52











  • Given your comment about Unity, it sounds like you should probably try to update to newer versions of Unity that support more recent versions of .NET. Trying to use .NET Core (very modern) with .NET 3.5 (10 years old) is bound to be painful. (But I would strongly urge you to give all of this information in your question.)

    – Jon Skeet
    Nov 13 '18 at 15:47

















Please specify the versions of .NET and .NET Core that are in use. The only version number you've provided is that you're currently building the common library against .NET 3.5... it's very likely that you should target .NET Standard instead, but we can't tell for sure without knowing the platform versions that need to consume the library.

– Jon Skeet
Nov 13 '18 at 14:50





Please specify the versions of .NET and .NET Core that are in use. The only version number you've provided is that you're currently building the common library against .NET 3.5... it's very likely that you should target .NET Standard instead, but we can't tell for sure without knowing the platform versions that need to consume the library.

– Jon Skeet
Nov 13 '18 at 14:50













I can target the .net framework from 2 to 3.5 The .net core version im using netcoreapp2.1

– Gabriel Slomka
Nov 13 '18 at 14:52





I can target the .net framework from 2 to 3.5 The .net core version im using netcoreapp2.1

– Gabriel Slomka
Nov 13 '18 at 14:52













Should I target .net standard in the common library ? Would it work as .net core for the server ? (runs in Linux)

– Gabriel Slomka
Nov 13 '18 at 14:52





Should I target .net standard in the common library ? Would it work as .net core for the server ? (runs in Linux)

– Gabriel Slomka
Nov 13 '18 at 14:52













Given your comment about Unity, it sounds like you should probably try to update to newer versions of Unity that support more recent versions of .NET. Trying to use .NET Core (very modern) with .NET 3.5 (10 years old) is bound to be painful. (But I would strongly urge you to give all of this information in your question.)

– Jon Skeet
Nov 13 '18 at 15:47





Given your comment about Unity, it sounds like you should probably try to update to newer versions of Unity that support more recent versions of .NET. Trying to use .NET Core (very modern) with .NET 3.5 (10 years old) is bound to be painful. (But I would strongly urge you to give all of this information in your question.)

– Jon Skeet
Nov 13 '18 at 15:47












1 Answer
1






active

oldest

votes


















1














I don't see why exactly have you chosen .NET Framework 3.5 but the solution is to compile the library against .NET Standard. The question remains how far can you go with this compilation.



.NET Framework 3.5 is not compatible with any version of .NET Standard, the earliest version is 4.5 as published in docs, here: https://docs.microsoft.com/en-us/dotnet/standard/net-standard



Obviously, the further .NET Standard version you chose, the higher .NET version you have to pick on the client side, as standard grows continuously and hence drops support for the older frameworks.



If you could upgrade your client project to .NET 4.5, having the lib in .NET standard 1 would resolve your compatibility issue.






share|improve this answer
























  • The client is being written in Unity3D so the maximum version the library I can use is .net framework 3.5 as far as I know. I haven't tested with .net standard I will test it out :D

    – Gabriel Slomka
    Nov 13 '18 at 15:44











  • Unity 5.6 support .Net 4.6 so I read somewhere

    – matt_lethargic
    Nov 16 '18 at 12:03











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283573%2fcompiling-net-core-dll-as-a-net-framework-dll%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I don't see why exactly have you chosen .NET Framework 3.5 but the solution is to compile the library against .NET Standard. The question remains how far can you go with this compilation.



.NET Framework 3.5 is not compatible with any version of .NET Standard, the earliest version is 4.5 as published in docs, here: https://docs.microsoft.com/en-us/dotnet/standard/net-standard



Obviously, the further .NET Standard version you chose, the higher .NET version you have to pick on the client side, as standard grows continuously and hence drops support for the older frameworks.



If you could upgrade your client project to .NET 4.5, having the lib in .NET standard 1 would resolve your compatibility issue.






share|improve this answer
























  • The client is being written in Unity3D so the maximum version the library I can use is .net framework 3.5 as far as I know. I haven't tested with .net standard I will test it out :D

    – Gabriel Slomka
    Nov 13 '18 at 15:44











  • Unity 5.6 support .Net 4.6 so I read somewhere

    – matt_lethargic
    Nov 16 '18 at 12:03
















1














I don't see why exactly have you chosen .NET Framework 3.5 but the solution is to compile the library against .NET Standard. The question remains how far can you go with this compilation.



.NET Framework 3.5 is not compatible with any version of .NET Standard, the earliest version is 4.5 as published in docs, here: https://docs.microsoft.com/en-us/dotnet/standard/net-standard



Obviously, the further .NET Standard version you chose, the higher .NET version you have to pick on the client side, as standard grows continuously and hence drops support for the older frameworks.



If you could upgrade your client project to .NET 4.5, having the lib in .NET standard 1 would resolve your compatibility issue.






share|improve this answer
























  • The client is being written in Unity3D so the maximum version the library I can use is .net framework 3.5 as far as I know. I haven't tested with .net standard I will test it out :D

    – Gabriel Slomka
    Nov 13 '18 at 15:44











  • Unity 5.6 support .Net 4.6 so I read somewhere

    – matt_lethargic
    Nov 16 '18 at 12:03














1












1








1







I don't see why exactly have you chosen .NET Framework 3.5 but the solution is to compile the library against .NET Standard. The question remains how far can you go with this compilation.



.NET Framework 3.5 is not compatible with any version of .NET Standard, the earliest version is 4.5 as published in docs, here: https://docs.microsoft.com/en-us/dotnet/standard/net-standard



Obviously, the further .NET Standard version you chose, the higher .NET version you have to pick on the client side, as standard grows continuously and hence drops support for the older frameworks.



If you could upgrade your client project to .NET 4.5, having the lib in .NET standard 1 would resolve your compatibility issue.






share|improve this answer













I don't see why exactly have you chosen .NET Framework 3.5 but the solution is to compile the library against .NET Standard. The question remains how far can you go with this compilation.



.NET Framework 3.5 is not compatible with any version of .NET Standard, the earliest version is 4.5 as published in docs, here: https://docs.microsoft.com/en-us/dotnet/standard/net-standard



Obviously, the further .NET Standard version you chose, the higher .NET version you have to pick on the client side, as standard grows continuously and hence drops support for the older frameworks.



If you could upgrade your client project to .NET 4.5, having the lib in .NET standard 1 would resolve your compatibility issue.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 '18 at 15:36









Jakub SzumiatoJakub Szumiato

1,1531716




1,1531716













  • The client is being written in Unity3D so the maximum version the library I can use is .net framework 3.5 as far as I know. I haven't tested with .net standard I will test it out :D

    – Gabriel Slomka
    Nov 13 '18 at 15:44











  • Unity 5.6 support .Net 4.6 so I read somewhere

    – matt_lethargic
    Nov 16 '18 at 12:03



















  • The client is being written in Unity3D so the maximum version the library I can use is .net framework 3.5 as far as I know. I haven't tested with .net standard I will test it out :D

    – Gabriel Slomka
    Nov 13 '18 at 15:44











  • Unity 5.6 support .Net 4.6 so I read somewhere

    – matt_lethargic
    Nov 16 '18 at 12:03

















The client is being written in Unity3D so the maximum version the library I can use is .net framework 3.5 as far as I know. I haven't tested with .net standard I will test it out :D

– Gabriel Slomka
Nov 13 '18 at 15:44





The client is being written in Unity3D so the maximum version the library I can use is .net framework 3.5 as far as I know. I haven't tested with .net standard I will test it out :D

– Gabriel Slomka
Nov 13 '18 at 15:44













Unity 5.6 support .Net 4.6 so I read somewhere

– matt_lethargic
Nov 16 '18 at 12:03





Unity 5.6 support .Net 4.6 so I read somewhere

– matt_lethargic
Nov 16 '18 at 12:03


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283573%2fcompiling-net-core-dll-as-a-net-framework-dll%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Florida Star v. B. J. F.

Error while running script in elastic search , gateway timeout

Adding quotations to stringified JSON object values