Copy DLL to directory with . nuspec without referencing it in project

Asked

Viewed 131 times

6

I created a local Nuget. It worked fine until we found a problem that I can’t solve right away. The following: There is a reference in the project, which calls another reference. Well, it turns out that this reference cannot be added as a reference, but this DLL must be in the same directory(folder) as the DLL referenced. If I put so: <file src="...." target="minha_pasta" /> she enters as reference. What I want is to move this DLL, that should not enter as reference in the package, for the directory in which the DLL reference is. Check out my .nuspec.

<package>
    <metadata>
        <id>NetRelatorios.Site.Paulo</id>
        <version>1.0.0</version>
        <authors>Tecnologia</authors>
        <description>01.SisAmilNetRelatorios.Site (Camada de apresentação)</description>
    </metadata>
    <files>
        <file src="SisAmilNetRelatorios.Site/AjaxControlToolkit/4.1.50731.0/AjaxControlToolkit.dll" target="lib/net40" />
        <file src="SisAmilNetRelatorios.Site/Interop.Shell32/1.0.0.0/Interop.Shell32.dll" target="lib/net40" /> 
        <file src="SisAmilNetRelatorios.Site/Microsoft.ReportViewer.WebForms/11.0.3442.2/Microsoft.ReportViewer.WebForms.dll" target="lib/net40" />
        <file src="SisAmilNetRelatorios.Site/Microsoft.ReportViewer.WinForms/10.0.40219.1/Microsoft.ReportViewer.WinForms.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.configuration.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.Data.DataSetExtensions.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.Data.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.Drawing.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.ServiceProcess.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.Web.ApplicationServices.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.Web.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.Web.DynamicData.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.Web.Entity.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.Web.Extensions.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.Web.Services.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.EnterpriseServices.dll" target="lib/net40" />
        <file src="NETFramework/v4.0/System.EnterpriseServices.Wrapper.dll" target="lib/net40" />
    </files>    
</package>

This DLL should not enter as reference. I should just copy it to the same directory, that’s all. I just need to copy to the same directory as this DLL.

<file src="NETFramework/v4.0/System.Web.ApplicationServices.dll" target="lib/net40" />

1 answer

1

What I want is impossible. The very nature of Nuget does not allow, ie if it is DLL and is in the folder in which the Nuget search, will be installed. If there is a need to have a situation similar to the one that was posted, unfortunately someone will have to put the DLL in hand in the folder after installation by Nuget.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.