我创建了示例点网应用程序,文件夹结构如下。
当我使用此命令时在dotnet publish -c release -o ./build_output demorepo2.csproj
文件夹中正确创建了build_output
构建输出。
现在我正在使用相同的命令dotnet publish -c release -o ./build_output test1.csproj
,但这不起作用。出现以下错误。
知道为什么会出现此错误吗?
来自ASP.NET Web Deployment using Visual Studio: Command Line Deployment
尝试运行此命令:
msbuild myproject.csproj /p:DeployOnBuild=true /p:PublishProfile=MyPublishProfile