Windows Server 2019, configured with Ansible.
I have tried with
- name: Install multiple packages
win_chocolatey:
name:
- nuget.commandline
- nunit-console-runner
- visualstudio2017buildtools
- dotnet
- dotnetfx
- netfx-4.8
- netfx-4.8-devpack
state: present
- name: Install dotnet core SDK 1.1
win_chocolatey:
name: dotnetcore-sdk
version: 1.1.14
state: present
allow_multiple: yes
- name: Install dotnet core SDK 2.1
win_chocolatey:
name: dotnetcore-sdk
version: 2.1.510
state: present
allow_multiple: yes
- name: Install dotnet runtime
win_chocolatey:
name: dotnetcore-runtime.portable
package_params: /ShimDotnetExe
state: present
but when running dotnet build foo.sln I still get
C:\Program Files\dotnet\sdk\2.1.510\Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install th
e SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from th
e Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.