.net - Nuget $project.Object.References.Add fails in install PS-script -


I have my newsletter packages, call it A to depend on another public package nunit.runner

when one relies on Nünit. The renter does not include the assemblies that are involved in my project, the parliaments I depend on are in the NUnit.Runners. 2.6.3 \ tools \ lib Therefore, because Nug only refers to assemblies in Lib, I think I need to add an install.ps1 to my newsletter package

Now I

  Ultimate ($ installPath, $ toolsPath, $ package, $ project) $ NunitRunners = join-path-path $ packagesFolder -childpath "NUnit.Runners.2.6.3" $ project.Object References.Add ($ NunitRunners + "\ nunit.core") $ project.Object.References.Add ($ NunitRunners + "\ ninit.core.infaces")  

but throwing it Exception that calls "add" to "<" "<" with "1" argument: "unspecified error (HRES Exception from ULT: 0x80004005 (E_FAIL) "$ + on project" Object. Reference. Add & lt; & Lt; & Lt; & Lt; ($ NunitRunners + "nunit.core.dll") + Category Information: Not specified: (:) [], Law Faculty + Fully Qualified EROID: Comptutivent Invocation

Any such sign That's why this is "welcome"

my install.ps1 (for reference here)

  write the ultimate ($ installPath, $ toolsPath, $ package, $ project) -Host "Install Path" $ InstallPath $ packagesFolder = Split-Path -Path $ installPath -Parent List-Host "Package Folder" $ PackageFolder Writing-host $ ToolsPath Write- Host $ package $ NunitRunners = join-path-path $ packagesFolder -childpath $ NunitRunners $ project.Object.References.Add ($ NunitRunners + "\ nunit.core") $ $ host $ write $ Nunit.Runners.2 Object.References.Add ($ NunitRunners + "\ nunit.core.interfaces")  

BTW I need to refer to those two assemblies, I do not need to reference nunit .framework

Note: I saw the thread in CodePlace but there is no solution i.e. the project does not have T client profiles and assemblies GAC Should not be)

path of NUnit.Core Dll and NUnit.Core.Interfaces.dll are incorrect .

Currently indicates package when it package \ NUnit.Runners.2.6 .3 \ tools \ lib should be pointing to.

So you can either change the $ NunitRunners path or add it later when you reference:

  $ project.Object.References.Add ($ NunitRunners + "\ Tools \ lib \ nunit.core.dll") $ project.Object.References.Add ($ NunitRunners + "\ tools \ Lib \ nunit.core.interfaces.dll")  
< / Div>

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -