ASP.NET Web Site - OctoPack

Is it possible to use OctoPack to create packages for ASP.NET Web Sites?

To give a trivial example I’ve created a new Web Site in VS2015 called “MyWebSite”.
I chose the Empty Web Site template and added a .html file to it.
I’ve then added OctoPack to the solution via Nuget.

From the command line I’ve used:

msbuild MyWebSite.sln /t:Build /p:RunOctoPack=true

MSBuild then proceeds to build the solution. As can be seen in the attached screenshot I get 2 messages at the end:

“Done Building Project \MyWebSite.metaproj”
“Done Building Project \MyWebSite.sln”

There is no mention of OctoPack and no package file is created or placed in the source or output folders.

Is this possible and if so what changes do I need to make to allow it to happen?

Hi Ray,

Thanks for getting in touch.

OctoPack was designed to work with .NET applications. If we try to make a new “Web site” using Visual Studio, we don’t get a real .csproj project file like we would if we were creating a .NET application. Eg: “File > New > Project > ASP.NET Web Application”. For situations like these, you could try using our Octo.exe tool with the pack argument (you can download Octo.exe from our downloads page - see the “Command Line” link).

Eg. If you’ve downloaded Octo.exe to a folder @ C:\Downloads\OctopusTools.4.15.3 and your MyWebSite files live in a folder @ C:\Development\MyWebSite, you could run the following Octo.exe pack command at the command line to package these files into a NuGet package:

C:\Development\MyWebSite> C:\Downloads\OctopusTools.4.15.3\Octo.exe pack --id=MyWebSite

Hope this helps.