开发者

ASP.NET deploy package created only when building from the command line

开发者 https://www.devze.com 2023-02-25 14:40 出处:网络
I have an ASP.NET MVC project whose project file I modified to have the following properties so that it would create a deploy package in a subdirectory of the output folder when it builds in the Relea

I have an ASP.NET MVC project whose project file I modified to have the following properties so that it would create a deploy package in a subdirectory of the output folder when it builds in the Release configuration:

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <DeployTarget>Package</DeployTarget>
    <DeployOnBuild>true</DeployOnBuild>
    <CreatePackageOnPublish>true</CreatePackageOnPublish>
</PropertyGroup>

When I build the project from the command line as follows:

msbuild projectname.csproj /p:Configuration=Release

Then, the deploy files are packaged up correctly in a subdirectory underneath the Release output. However, if I build the project from within Visual Studio the deploy files and packages aren't created, even if I h开发者_如何学Pythonave the configuration set to Release.


Is it possible you are not under the any CPU playpen in vs? You could probably remove that all together from the conditional.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号