One VS solution with a class library reference, how do i publish to azure web apps

Daniel 156 Reputation points
2021-08-16T06:45:03.697+00:00

Hi,

I know that you can not publish a solution with two projects to the same web app.

But what is the general idea? By creating a second class library project and reference this from the main app project I separate the functions in my solution. But how is this supposed to be “exported” to a published app?

With a unit test class as part of a solution I can understand that this should not be published to a web app but the library is something the main app uses.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,140 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,578 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,829 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 22,086 Reputation points Microsoft Employee
    2021-08-17T19:57:53.667+00:00

    @Daniel , Adding to AgaveJoe, If the library is something the main app uses it likely is already a reference in the WebApp project and gets copied with the WebApp. Publishing the WebApp only in this case should be sufficient for your scenario. If for some reason the library is not referenced by the WeApp and you are loading some other way, could you share more details on how/why you might be doing that?

    See these Azure App Service docs for more info:
    File structure on azure
    Customizing deployments
    Deployment vs runtime issues

    P.S. I'd added additional tags to receive insights from the targeted SMEs/community.

    0 comments No comments