Itiviti / gradle-msbuild-plugin

Gradle plugin for msbuild execution, supports C# project files for now
Apache License 2.0
101 stars 58 forks source link

parameters.RestorePackages.config appears to be ignored #127

Closed ObsidianDoom closed 2 years ago

ObsidianDoom commented 2 years ago

Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET Framework Gradle 7.0.2

I have an ASP.NET project in the solution that cannot convert to package reference so I need to pass in RestorePackagesConfig - but this seems to be ignored and packages are not restored and build fails. Is the syntax incorrect (below) or is that property not supported ?

plugins { id 'com.ullink.msbuild' version '3.13' }

tasks.register('windowsBuild',com.ullink.Msbuild) { println("Windows Build requested for ${project.displayName}") solutionFile = 'MySolution.sln' configuration = 'Release' targets = ['Clean', 'Restore', 'Rebuild'] parameters.RestorePackagesConfig = true }

The non ASP.NET projects restore from nuget correctly. If I run msbuild in command line (non gradle plugin) -the packages are restored

ngyukman commented 2 years ago

hi @Lizalex-Systems

for restoring packages, please use https://github.com/Itiviti/gradle-nuget-plugin, it has a nugetRestore task that you could leverage for that purpose