asp.net - Is there a way to include an assembly referenced using Unity when using publish website? -


I am using repository patterns and integrity to manage reliance on my concrete stockpile objects. This is not an issue in itself, although I am running into a problem while using the website published in both the VS and TFS build process.

I believe that the problem is arising from the fact that although the Concrete repository objects in this project are referred to in my application, the reasons for which they do not use directly in the Is that my web? Using Unity to create examples of concrete objects on runtime, using Integration Configurations in Configuring.

The repository project is being compiled, the published website is used either in TFS VS, where the repository assembly is missing. So when the web application is deployed on a web server, it is not possible to use it because you were greeted with an error:

The name of the given assembly or codebase was invalid. (Exception from HRESULT: 0x80131047)

That's because unity, you can not get a lost assembly.

So my specific question is; Is there a way to ensure that the repository assembly is copied directly to the output without using any of the concrete sections in the project directly to the website in VS and TFS?

Then with some excavation I have solved my problem, this soltuion can only be produced with TFS Time fixes the problm but to be honest with continuos integration, let me VS Do not care about publishing from

Could copy the folder

Here's what I did:

  1. I right click on my web project in Solution Explorer and click on 'Unload Project'.
  2. Then I right click on the loaded project and 'Edit [Project Name] '
  3. Scroll down at the bottom of the file It has been found that the following target creation has been commented:

    & lt; Target name = "afterbild" & gt; & Lt; / Target & gt;

  4. I've added the command to copy the Miss Assembly to modify it:

    & lt; Target name = "AfterBuild" & gt;

    & lt; Copy SourceFiles = "$ (OutDir) [Name of the missing assembly] " DestinationFolder = "$ (OutDir) Websites published $ $ (MSBuildProjectName) \ bin" SkipUnchangedFiles = "true <

  5. Now when the solution is created in TFS, the unavailable assembly is included in the Bin folder of the published website. Output.

    This solution can be used to copy any other unavailable content into published website output. Every project that you want to copy, is likely to differ in this way for each project, maybe this is the best option though I am thinking of creating a custom version of Microsoft.WebApplication.targets which is the minimum CSS And the script copies the files.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -