asp.netasp.net-core

Unable to configure the build output directory on .net web project


I am currentily working on an old .net web project, and the propieties of the project are missing alot of options. The project has no csproj file, and its info, like framework is written on the sln file.

How do i configure the build output directory location in this kind of project?

Propieties Image

I have tried to following the documentation, but the option in simpling not there.

https://learn.microsoft.com/en-us/visualstudio/ide/how-to-change-the-build-output-directory?view=vs-2022


Solution

  • Since the documentation you've followed is for a different type of project like Web Application Project that does have a .csproj file, it would not apply to a Web Site Project. If the options are not present in the project settings, it's likely because of the project type you're working with.For Web Site Projects (WSP) in .NET, which don't have a .csproj file.

    Here are the steps you could follow to precompile your web site:

    1. In Visual Studio, go to the "Build" menu.
    2. Click on "Publish Web Site".
    3. In the Publish Web Site dialog, you can specify the target location for the precompiled website. This can be a local directory or a remote server path.

    For more advanced scenarios, if you need to have a custom build process, you might need to modify the .sln file or create custom MSBuild scripts that are executed during the build process.