0

I have a Winform GUI that works fine on my windows 10 machine. When I try to run it on a Windows 2003 server machine I get the following:

'Could not load file or assembly "System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" or one of its dependencies. The system cannot find the file specified.

I am using .net 4 since it works on server 2003. The GUI loads fine just some part of the functionality triggers this error. How to fix this issue?

Lightsout
  • 3,454
  • 2
  • 36
  • 65
  • 1
    [See this question](https://stackoverflow.com/questions/42867434/could-not-load-file-or-assembly-system-valuetuple) – Ibram Reda Jun 23 '21 at 19:50

1 Answers1

-1

Value tuples are only available starting from .NET Framework 4.7 and above.

See the Applies to section in the docs:

.NET Framework 4.7, 4.7.1, 4.7.2, 4.8

But you're out luck, .NET Framework 4.7 lowest supported server is 2008 R2 SP1:

Supported Operating System

Windows 10

Windows 7 Service Pack 1

Windows 8.1

Windows Server 2008 R2 SP1

Windows Server 2012

Windows Server 2012 R2

Windows Server 2016

aybe
  • 15,516
  • 9
  • 57
  • 105
  • System.Value Tuple can be downloaded as nuget package for earlier Frameworks but still should be at least 4.5. I assume that one is also not supported on 2003 – Ralf Jun 23 '21 at 19:55
  • You are right, the requirements for 4.5 are the same for servers: https://www.microsoft.com/en-us/download/details.aspx?id=30653 – aybe Jun 23 '21 at 19:57
  • that's weid because the Target framework for my project is ".NET Framework 4" but they still let me use it without giving me error – Lightsout Jun 23 '21 at 19:57
  • One thing is the Framework you target, another the run-time Framework. E.g., if you have .Net 4.8 installed, your app targeting .Net Framework 4.0 will run on 4.8. – Jimi Jun 23 '21 at 20:08