简体   繁体   中英

Publish WPF Project from Command Line

I have a solution containing only one WPF project, when i try it create a package from this project using msbuild(commandline), i got the error

The target "Package" does not exist in the current project.

Troy hunt discuss about this problem in this link Why the target "Package" does not exist in the current project. , but it does not help me, maybe because i am using a WPF project and that example is for a web project.

Thanks

I was trying to create the publish the project using

msbuild MyProject.csproj /t: package /p:configuration=release

The above line works perfectly fine for web projects but for windows project it should be

msbuild MyProject.csproj /t: publish /p:configuration=release

I hope it saves someone's time

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM