3

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

Stuart
  • 3,949
  • 7
  • 29
  • 58
  • Could either use https://github.com/marketplace/actions/setup-nuget-exe-for-use-with-actions or use a docker with nuget – Rani Sharim Apr 08 '22 at 09:39
  • Did you try ````dotnet restore```` in given paths? How ````Foo-EUR-Web```` doesn't have .csproj file? It contains only build files? – Onurkan Bakırcı Apr 13 '22 at 12:30

0 Answers0