Reputation: 634
Here's my setup. I have a classic .Net website, not web app. I have all my compiled objects in a self-hosted nuget repo. When I build in VS, it looks at my packages and copies the binaries to the bin folder but when I try and build in Azure DevOps it's not working. My Nugets restore just fine but I haven't hit on the right msbuild arguments to make it work. I know that .Net websites are not common these days. I found this (How to use NuGet packages with an ASP.NET Website on CI Server) which was a path I was considering (putting .refresh.dll files in source control) but it seems like there should be an easier way.
Upvotes: 3
Views: 1423
Reputation: 76880
How do I get my nuget packages copied to bin during a build for a asp.net website (not web app)?
What you are considering (putting .refresh.dll files in source control) is the most appropriate way.
From here:
They are simple because if you view them in a text editor, you’ll see they contain nothing more than the full path to the dll.
Turns out, these dll.refresh files are an exception to the rule, and they should go into source control. Its the only way your web project will know where its references live.
For building and package restore to work, you can keep the bin folder and any .refresh
files. You can remove the other binaries from your version control system.
Hope this helps.
Upvotes: 2