How to target Mono framework from VS2015?

后端 未结 2 2090
挽巷
挽巷 2021-02-14 04:24

I want to deploy ASP.NET web app on Linux with mono installed.

From what I know Mono is a targeting platform similar to .DNX 4.5.1 or .DNX Core 5.0. So I need somehow ad

2条回答
  •  误落风尘
    2021-02-14 05:10

    Compile from Visual Studio and target Mono

    As extract from here

    You can compile against Mono on Windows, from Visual studio with MonoHelper addin (using xbuild underneath).

    There is also another solution, which is targeting a "Mono" .NET Framework profile from visual studio. Following steps come from here and it's for VS 2012 (but it should work for other versions).

    1. Create two registry keys:

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0,Profile=Mono

      HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0,Profile=Mono

    2. Make a link to Mono directory inside of Microsoft References Assemblies Directory (you may need to run the following with administrator rights)

      cd "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Profile" mklink /d Mono "C:\Program Files (x86)\Mono\lib\mono\4.5" cd Mono mkdir RedistList cd RedistList notepad FrameworkList.xml

    3. Edit FrameworkList.xml

    Paste the following inside FrameworkList.xml

    
     
    

提交回复
热议问题