Why isn't my project link picked up by web deployment packaging in Visual Studio?

I have a Visual Studio 2010 solution with two projects:

  • ASP.NET MVC 3 Web Application.
  • Class library.

The MVC application has a project link for the class library.

When I use the Build Deployment Package option in Visual Studio to create a zip file with my deployment web application, it does not include the class library. Thus, after deployment, I get an exception due to a missing build.

I confirmed that the project link is set to "Copy local = true". . When you create and debug the site, everything works fine, and the class library is in the bin folder. This only happens when you create a deployment package that it is missing.

If I switch from a project link to a direct build link by pointing to the bin / Debug / ClassLibrary.dll file, the package will build correctly and include a class library. I only see the problem when it refers to the project.

How can I get a class library as a reference to a project to be properly included in a web application package?

+5
source share
2

, , VS.NET, , MSBuild script.

.zip MSDeploy/WebDeploy .csproj MSBuild :

<MSBuild Projects="Path\To\Project.csproj"
         Targets="ResolveReferences;Package"
         Properties="Configuration=Release;DeployOnBuild=true;DeployTarget=Package;PackageLocation=Path\To\Output.zip" />

Targets = "ResolveReferences; Package". Targets = "Package", .

-, , , ResolveReferences. , , .

+1

- , ?

0

All Articles