Relationship between .NET version and C# version? [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
How can I determine what version of C# I can use against a particular .NET Framework version?
I have read:
https://stackoverflow.com/a/247623/223742
https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies
However I cannot tell with any degree of certainty what version of C# I can use say against .NET Framework 4.6.1 for instance.

C# version history could be found here.
C# version depends on the compiler version which is shipped with .NET SDK (generally known installed with Visual Studio Installer).
You could still target an .NET implementation (which means .NET Core, Mono, or the obsoleted .NET Framework) of lower version with a project that builds with SDKs of a later version, but some language features are not supported, which are implemented with some built-in types that are not provided by the target .NET implementation. For example, you cannot use the tuple syntax targeting .NET Framework 4.5, even if you build it with the latest .NET SDK, because .NET Framework 4.5 does not have ValueType definitions. But some could be fixed with nuget packages that supplement them such as System.ValueTuple.
C# 8.0 has already been released with .NET Core 3.0.

Related

Nuget Package not installing in framework 4.6.1 VS 2017 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Error Could not install package 'Microsoft.EntityFrameworkCore 5.0.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Installing in Visual Studio 2017
Microsoft.EntityFrameworkCore targets .NET Standard 2.1, which basically means it will only work on .NET Core 3.1 or above; .NET Framework (any version) does not support .NET Standard 2.1; some versions of .NET Framework support .NET Standard 2.0 (at least, sort-of), but that isn't enough.
Two options:
move away from .NET Framework (hugely preferred option) - ideally to .NET 5.0 or .NET Core 3.1 (at time of writing)
use an older version of Entity Framework; EF 6.4.4 works down to .NET 4.0, or (as noted by Hostel in comments) EF Core 3.1.10 may work on .NET Framework 4.6.1

What is the stable and latest version of .Net Framework we can use in WPF Application? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to upgrade my live WPF Application's .Net Framework.
Which is the stable and latest version in .Net Framework ?
Thanks in advance!!!
As of right now, the latest version of the full .NET framework is version 4.7.2. You can find the latest SDK and runtime downloads here on the Microsoft download website and install what you need.
I think that it is a nice iniciative of you to upgrade the .Net of your WPF Application.
Right now, as 20 June,2018, it is .NET Framework 4.7.2 and it can be downloaded at
https://www.microsoft.com/net/download/windows
This month they released .NET Framework 4.8 Early Access build 3621
https://blogs.msdn.microsoft.com/dotnet/2018/06/06/announcing-net-framework-4-8-early-access-build-3621/
Also it was announced earlier that .Net Core 3 will support for Windows Desktop, namely: WPF, Windows Forms and UWP
https://blogs.msdn.microsoft.com/dotnet/2018/05/07/net-core-3-and-support-for-windows-desktop-applications/
Note: To do this upgrade, on my projects, on the most cases it was just a matter of installing the newest Net Framework SDK, set the target in Project settings and rebuild the App in Visual Studio 2017.

Mocking framework in UWP Apps [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Im trying to find a good mocking framework to Unittest my UWP App, bt it seems that all good Mocking infrastructures (MOQ, RhinoMocks etc) understandably rely on Dynamic Proxies which is not supported in UWP.
It looks like MOQ knows of this limitation:
https://github.com/Moq/moq4/issues/195
And Microsoft is less than helpful in this situation:
https://social.msdn.microsoft.com/Forums/en-US/652b9d16-c4ab-401c-9239-0af01108e460/uwp-is-there-any-indication-that-windows-10-uwp-universal-applications-will-support-code-emitting?forum=wpdevelop
Is there any Mocking infrastructure for unittesting UWP apps? Or any ideas if Dynamic Proxy support is coming anytime in the near future for UWP?
Thanks!
We (Microsoft BigPark Studio) have just released a mocking framework that is compatible with UWP, .NetCore and .Net Framework (Nuget Etg.SimpleStubs). The framework uses Roslyn to generate stubs.
To get around the Reflection.Emit restriction in UWP, the framework generates the stubs at compile time. The stubs are generated and compiled in one step (during the build). If you've ever used VS Fakes, the experience is very similar.
SimpleStubs is opensource and available as a NuGet:
Docs: https://github.com/Microsoft/SimpleStubs
NuGet: https://www.nuget.org/packages/SimpleStubs/
There is now a framework called HyperMock which performs mocking in a similar way to other frameworks on the .NET platform.
Visit HyperMock
As this is available via Nuget, you can find it via the package manager with HyperMock.Universal or install it via the package console
Install-Package HyperMock.Universal
Use the Universal version for the UWP projects.

Will C# be available on other platforms soon? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Microsoft announced a open-source cross-platform .NET 5. I know that there are librarys like mono that act as a framework for cross-platforming with C# - but does the release of .NET 5 mean that it will be easier to work with C# on other platforms without MONO, Xamarin etc?
.NET 5 will allow cross development, have a look at this blog posts:
Microsoft takes .NET open source and cross-platform, adds new development capabilities with Visual Studio 2015, .NET 2015 and Visual Studio Online
And:
Announcing .NET 2015 - .NET as Open Source, .NET on Mac and Linux, and Visual Studio Community
Delivering on its promise to support cross-platform development, Microsoft is providing the full .NET server stack in open source, including ASP.NET, the .NET compiler, the .NET Core Runtime, Framework and Libraries, enabling developers to build with .NET across Windows, Mac or Linux. Through this implementation, Microsoft will work closely with the open source community, taking contributions for future improvements to .NET and will work through the .NET Foundation.
source

Is .net 4.5 a major upgrade to 4.0 or is it just a matter of including updating .dll? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
If my server is currently setup with .net 4.0, is 4.5 a major release or is it something like .net mvc where I just have to include the mvc related dll's in my /bin folder?
.NET 4.5 must be installed on the server. It is not simply a .dll to include. You do have to specify 4.5 in your web.config to use 4.5 features. You only have to include the dlls for packages you use that use the 4.5 framework. I recommend using NuGet package manager to handle this so you don't have to do it manually.
However, in IIS, 4.5 does not appear as a .NET version for application pools and uses the 4.0 runtime. In that sense, it is similar to 3.5 where you need to set your app pool to version 2.0.

Categories