Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for different publish profiles? #10

Open
ZacP opened this issue Apr 2, 2015 · 6 comments
Open

Support for different publish profiles? #10

ZacP opened this issue Apr 2, 2015 · 6 comments

Comments

@ZacP
Copy link

ZacP commented Apr 2, 2015

Is it possible to execute different publish ignore files based on the name of the publish profile?

For example, if we have two publish profiles - one for PublishA and one for PublishB, can we run publishA.ignore and publishB.ignore for these profiles?

@sayedihashimi
Copy link
Member

No that's not supported. You can exclude files in the publish profile (.pubxml) but you'll need to author that in MSBuild.

@sayedihashimi
Copy link
Member

It may be possible you edit the .pubxml to do what you want. Related code at https://github.com/ligershark/publish-ignore/blob/master/src/ls.pubignore.wpp.targets#L19

@ZacP
Copy link
Author

ZacP commented Apr 2, 2015

Thanks Sayed.
Is there any way to read the publish profile name in the .wpp.targets file? If so, this would be really easy.
For example, if we could get the profile name as $(ProfileName)

  <PubIgnoreFiles Include="$(MSBuildProjectDirectory)\publish-$(ProfileName).ignore" Condition=" Exists('$(MSBuildProjectDirectory)\publish-$(ProfileName).ignore') "/>

@sayedihashimi
Copy link
Member

Try PublishProfile, if that doesn't work respond here and I'll look into it. I'm not 100% sure if VS sets that or not, but for cmd line publish that is the property.

@ZacP
Copy link
Author

ZacP commented Apr 2, 2015

Nope - that property doesn't work. We tried that and a few other variations but it didn't work.
I just tried PublishProfile again to double check but it doesn't work.
Thanks for your help

@sayedihashimi
Copy link
Member

Ok I will investigate and reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants