I have a solution with a web application project (WAP), which builds and packages in Visual Studio. But, when I run this Albacore msbuild
task, it doesn't work.
msbuild :build do |msb|
msb.solution = '../../src/Solution.sln'
msb.targets :clean, :build, :Package
msb.properties = {
:configuration => :Dev
}
end
I get this error
The target "Package" does not exist in the project ....Solution.sln
How do I build a WAP and make a package using Albacore and rake?
Update: working task
msbuild :build do |msb|
msb.solution = '../../src/Solution.sln'
msb.targets :clean, :build
msb.parameters = '/p:DeployOnBuild=true;DeployTarget=Package'
msb.properties = {
:configuration => :Dev
}
end
When you build a solution file you can only use the following targets.
If you are trying to invoke the Package target on a Web Application Project (WAP) then, you can use the following syntax to call it for every WAP in that solution.
msbuild YourSolution.sln /p:DeployOnBuild=true;DeployTarget=Package
WAP projects have a special hook to invoke any target during a build. That is enabled by the when the property DeployOnBuild=true
and the target that is invoked is defined by the DeployTarget property.
I'm not sure what the Rake syntax is for that, but if you could post it here for others that would be ideal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With