NPanday and ASP.NET Projects

Structure of ASP projects

In Visual Studio you can build and publish a web application using right click in a ASP.NET project -> Publish

A simple Web Application in ASP .NET will generate:

.
|-- bin/
|   |-- *.dll -- the assemblies referenced by the application
|   |-- artifact.dll -- the project assembly
|   `-- artifact.pbd -- the program debug database
|-- Web.config
`-- *.aspx -- ASP pages

This can be deployed to IIS.

The normal compilation using the dotnet compiler plugin already generates proper DLLs.

The plugin created an aspnet type that generates the DLL in target/artifactId/bin and copies all aspx files to target/artifactId

It then zips that folder and install it in the repo (in the future create a msi package - perhaps by using the wix plugin as well).

<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
  <id>dist</id>
  <formats>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <directory>${basedir}/target</directory>
      <outputDirectory>/bin</outputDirectory>
      <includes>
        <include>**/*.dll</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>${basedir}</directory>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>web.config</include>
        <include>**/*.aspx</include>
      </includes>
    </fileSet>
  </fileSets>
</assembly>

Precompilation of ASP pages

The SDK provides a ASP .NET precompiler aspnet_compiler that is used to check for errors in the ASP pages. See also: Precompilation In ASP.NET 2.0.

Implementation

Create an aspx-compiler-mojo for aspnet_compiler executable, and run

aspnet_compiler.exe -v /artifactId -p artifactId\ -u -f target\artifactId

Visual Studio Addin

The Add-in needs to recognize Web and Webservices projects in project import

Implementation

Recognize Web and Webservices projects by checking the packaging