Whenever i do the publish its having the CS and Solution files as well.
I tried too many things but all in vain enter image description here
These are my MS build arguments /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\CC
You're specifying a package location in your MSBuild arguments: /p:PackageLocation="$(build.artifactstagingdirectory)\CC
. That's the path you want to publish as an artifact if all you want is the packaged binaries.
The path you're currently specifying, $(agent.builddirectory)\s\Main\State
is the location used by the build agent to synchronize source code, so of course you're capturing source code when you publish that as an artifact.