Reputation: 149
Configuring deployment process for the project and facing some issues with packaging the output of msbuild to a nuget package with OctoPack. Have decided to get a feedback about the process, may be I'm doing something wrong.
Preconditions:
Project structure:
The build process:
Msbuid compiles C# code, then executes publish command: compiles JS code and copies everything into a custom output folder.
To run build and generate an application, I run the following command (locally or on TFS server):
MSBuild solution.sln /t:Build /p:DeployOnBuild=true /p:Configuration=development /p:PublishProfile="development"
The output of this command contains everything I need (including Assets folder): I can take it and copy for IIS.
Now, I want to integrate Octopack. I've installed Octopack nuget package and added additional parameter /p:RunOctoPack=true:
MSBuild solution.sln /t:Build /p:DeployOnBuild=true /p:Configuration=development /p:PublishProfile="development" /p:RunOctoPack=true
Octopack creates a nuget package, but it doesn't have Assets folder. According to documentation, Octopack takes everything from \bin folder, but the Assets folder exists in obj\Development. And this is not a part of the solution, this folder is being re-created every time I run npm build task.
Now, questions:
Thanks for the feedback
Upvotes: 1
Views: 311
Reputation: 2631
You can tell Octopack to add additional files by creating a nuspec file.
In there you can add the paths of the files & directories you want included as part of the package.
So on your CI server, you'd want to do your client side bundling before the MS build process so that the files exsist.
Upvotes: 0