Add Assemblies to Visual Studio 2015 ASP.NET 5

对着背影说爱祢 提交于 2019-12-02 04:18:17

问题


I want to add "Stimulsoft.Report.dll" as an assembly in my Visual Studio 2015 ASP.Net 5 project.

But the reference manager does not contain the assemblies section with the extentions area(as it is in VS 2013), where i could select "Stimulsoft.Report" and add this to my references.

Is there any solution adding these reference to my ASP.NET 5 project?


回答1:


you can add the assembly if it available in GAC like below code

 "frameworks": {
    "aspnet50": {
        "frameworkAssemblies": {
            "Stimulsoft.Report": ""
        }
    }
}

in the second part, you can give the version and type of the assembly




回答2:


In your project.json you can do:

"frameworks": {
    "aspnet50": {
        "bin": {
            "assembly": "<path to dll>",
            "pdb": "<path to pdb if needed>"
        }
    }
}



回答3:


One workaround is to create a class library project with your 3rd party library reference. Then use a project reference from your website to the class library project.

Edit: Use a traditional class library, not an ASP.Net 5 class library.




回答4:


(1) Package your assembly with nuget
(2) Follow the @AndersNS answer talking about nuget repository



来源:https://stackoverflow.com/questions/29494695/add-assemblies-to-visual-studio-2015-asp-net-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!