Accessing Nuget Package Manager console in github actions

179 Views Asked by At

I have a fairly messy website project in C#

It has the layout of

Foo-EUR
Foo-EUR-Web

Where Foo-EUR has a csproj file and Foo-EUR-Web does not. It's just a website.

To get this to build locally I need to go to the Package Manager console for nuget and enter:

Update-Package -reinstall -project Foo-EUR-Web

This then copies all the dlls to the folder Foo-EUR-Web\Bin

If I don't do this, I get the error:

error ASPCONFIG: The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.

My problem is I'm trying to build this on github actions. I don't have Update-Package available.

I've tried

nuget restore src/Foo-EUR.sln
nuget restore src/Foo-EUR/packages.config
nuget restore src/Foo-EUR-Web/packages.config -PackagesDirectory packages

Nothing is working.

I think the issue is because there is no csproj, but adding one would be problematic.

Is their a way to install the Nuget Package manager into powershell as a github action to allow me to run Update-Package to get this to build ?

Or is there something else I'm missing here with nuget?

The framework version is 4.6.1

0

There are 0 best solutions below