How do I install .NET Framework 4 SDK?

28 views
Skip to first unread message

Amedee Van Gasse

unread,
Feb 1, 2021, 3:36:50 AM2/1/21
to Ansible Project
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. 

jbor...@gmail.com

unread,
Feb 1, 2021, 5:28:10 PM2/1/21
to Ansible Project
This doesn't really sound like an Ansible question, dotnet build is complaining it can't find the assembly and that's just what Ansible is reporting. YOu need to figure out the correct install steps first then you can do the same with an Ansible task.

Amedee Van Gasse

unread,
Feb 5, 2021, 7:54:59 AM2/5/21
to Ansible Project
I don't know how to figure out the correct install steps. My devs don't want to help me, they dumped me on a web page with just a list of software they manually install with next-next-next-finish.

Dick Visser

unread,
Feb 5, 2021, 8:38:43 AM2/5/21
to ansible...@googlegroups.com

Ansible can automate the installation, but it doesn't magically know what you want to automate. This is basically the effort that you have to put in.

I can't make this more specific than that you need to write an ansible playbook with tasks to install that "list of software".



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1af49f12-6d51-448e-9f07-b32869afb4dfn%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.
Reply all
Reply to author
Forward
0 new messages