SilverXXX
SilverXXX

Reputation: 31

Compiling a .NET project using NuGet, PostSharp and Jenkins

I've got some serious problems when trying to compile a C# project in Jenkins which needs NuGet for package management and PostSharp for aspects. I added EnableNuGetPackageRestore=true as an environment variable, and all packages are retrieved every time. PostSharp has been installed in the system, but i still get error every time:

error CS1029: #error: 'PostSharp is not introduced in the build process. If NuGet just restored the PostSharp package, you need to rebuild the solution.'

How can i solve this?

Upvotes: 0

Views: 2207

Answers (1)

fjxx
fjxx

Reputation: 945

You may have to configure to fetch NuGet packages (especially PostSharp) before you compile/build in Jenkins.

This blog post describes a possible workaround using a batch file: http://blog.overridethis.com/blog/post/2012/02/17/Enable-NuGet-Package-Restore-e28093-When-the-basics-fails!.aspx

Upvotes: 1

Related Questions