asp.net.netdevopscicd

ASP.NET Website Project CI/CD Publish issue


I'm attempting to work on .NET Framework 4.7.2 website project without a .csproj or similar project file. When attempting to publish using command:

msbuild ./<website-folder-name> /t:Publish /p:PublishDir=publish

it doesn't seem to work.

Has anyone faced this scenario? Any suggestions would be appreciated.


Solution

  • The legacy ASP.NET Website project type uses .sln files and devenv.exe, not .csproj files nor MSBuild. That's why your attempt didn't work.

    Besides, this type of projects are deployed to IIS directly, and the contents are compiled when the first request arrives. So, there is not much CI/CD needed compared to the other ASP.NET/ASP.NET Core project types.

    If possible, don't use such project type any more, as it has too many limitations. Most people got rid of them two decades ago.