Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DNU publish --no-source from MSBuild

Is it possible to invoke dnu publish with the --no-source attribute from MSBuild when triggering the FileSystemPublish target?

MSBuild command:

/t:Build,FileSystemPublish /p:PublishConfiguration=$(BuildConfiguration) /p:PublishOutputPathNoTrailingSlash=$(build.stagingDirectory)

MSBuild ultimately calls the following:

dnu publish "C:/MyApplication" --out "C:/a/MyApplication" --configuration Release --runtime dnx-clr-win-x86.1.0.0-beta6 --quiet

I would like to append the --no-source attribute.

like image 244
Dave New Avatar asked Oct 19 '22 02:10

Dave New


1 Answers

you can pass /p:compileSource=true to set the --no-source option during dnu publish.

(Also, you don't have to use the specific publish target FileSystemPublish, you can set the msbuild property /p:deployOnBuild=true to publish after build.)

like image 98
vijayrkn Avatar answered Oct 22 '22 22:10

vijayrkn