Microsoft.net In Mac
By Scott Addie
I need to use/continue developing a desktop app developed using.NET on my Mac. Is there a.NET framework 4.0 available for Mac? Would this allow running and developing of.NET-based apps on a Mac? Another option that i am considering is using a windows virtual machine on the Mac. Microsoft net framework free download - Abyss Web Server X1, OpenLink Virtuoso Universal Server (Personal Edition), and many more programs.
This document provides guidance for using ASP.NET Core APIs in a class library. For all other library guidance, see Open-source library guidance.
Determine which ASP.NET Core versions to support
Nov 12, 2014 MS does not have a Mac IDE and I don't expect them to create one either. This is a good direction for Microsoft and.NET, but unless you are an enterprise software developer using.NET, this. Sorry, JavaScript must be enabled to use this app.
ASP.NET Core adheres to the .NET Core support policy. Consult the support policy when determining which ASP.NET Core versions to support in a library. A library should:
- Make an effort to support all ASP.NET Core versions classified as Long-Term Support (LTS).
- Not feel obligated to support ASP.NET Core versions classified as End of Life (EOL).
To run Active Trader Pro ® on my Mac, do I need to download anything besides the installer? No, the installer will include CrossOver, Microsoft.NET, and the Active Trader Pro ® software. CrossOver is a version of Wine that is required to run Windows applications on the Mac. I need to use/continue developing a desktop app developed using.NET on my Mac. Is there a.NET framework 4.0 available for Mac? Would this allow running and developing of.NET-based apps on a Mac? Another option that i am considering is using a windows virtual machine on the Mac.
As preview releases of ASP.NET Core are made available, breaking changes are posted in the aspnet/Announcements GitHub repository. Compatibility testing of libraries can be conducted as framework features are being developed.
Use the ASP.NET Core shared framework
With the release of .NET Core 3.0, many ASP.NET Core assemblies are no longer published to NuGet as packages. Instead, the assemblies are included in the Microsoft.AspNetCore.App
shared framework, which is installed with the .NET Core SDK and runtime installers. For a list of packages no longer being published, see Remove obsolete package references.
As of .NET Core 3.0, projects using the Microsoft.NET.Sdk.Web
MSBuild SDK implicitly reference the shared framework. Projects using the Microsoft.NET.Sdk
or Microsoft.NET.Sdk.Razor
SDK must reference ASP.NET Core to use ASP.NET Core APIs in the shared framework.
To reference ASP.NET Core, add the following <FrameworkReference>
element to your project file:
Referencing ASP.NET Core in this manner is only supported for projects targeting .NET Core 3.x.
Include Blazor extensibility
Blazor supports WebAssembly (WASM) and Server hosting models. Unless there's a specific reason not to, a Razor components library should support both hosting models. A Razor components library must use the Microsoft.NET.Sdk.Razor SDK.
Support both hosting models
To support Razor component consumption from both Blazor Server and Blazor WASM projects, use the following instructions for your editor.
Use the Razor Class Library project template. The template's Support pages and views checkbox should be deselected.
Run the following command in the integrated terminal:
Use the Razor Class Library project template.
The project generated from the template does the following things:
- Targets .NET Standard 2.0.
- Sets the
RazorLangVersion
property to3.0
.3.0
is the default value for .NET Core 3.x. - Adds the following package references:
For example:
Support a specific hosting model
It's far less common to support a single Blazor hosting model. As an example, to support Razor component consumption from Blazor Server projects only:
- Target .NET Core 3.x.
- Add a
<FrameworkReference>
element for the shared framework.
For example:
For more information on libraries containing Razor components, see ASP.NET Core Razor components class libraries.
Include MVC extensibility
This section outlines recommendations for libraries that include:
This section doesn't discuss multi-targeting to support multiple versions of MVC. For guidance on supporting multiple ASP.NET Core versions, see Support multiple ASP.NET Core versions.
Razor views or Razor Pages
A project that includes Razor views or Razor Pages must use the Microsoft.NET.Sdk.Razor SDK.
If the project targets .NET Core 3.x, it requires:
- An
AddRazorSupportForMvc
MSBuild property set totrue
. - A
<FrameworkReference>
element for the shared framework.
The Razor Class Library project template satisfies the preceding requirements for projects targeting .NET Core 3.x. Use the following instructions for your editor.
Use the Razor Class Library project template. The template's Support pages and views checkbox should be selected.
Run the following command in the integrated terminal:
No project template support at this time.
For example:
If the project targets .NET Standard instead, a Microsoft.AspNetCore.Mvc package reference is required. The Microsoft.AspNetCore.Mvc
package moved into the shared framework in ASP.NET Core 3.0 and is therefore no longer published. For example:
Tag Helpers
A project that includes Tag Helpers should use the Microsoft.NET.Sdk
SDK. If targeting .NET Core 3.x, add a <FrameworkReference>
element for the shared framework. For example:
If targeting .NET Standard (to support versions earlier than ASP.NET Core 3.x), add a package reference to Microsoft.AspNetCore.Mvc.Razor. The Microsoft.AspNetCore.Mvc.Razor
package moved into the shared framework and is therefore no longer published. For example:
View components
A project that includes View components should use the Microsoft.NET.Sdk
SDK. If targeting .NET Core 3.x, add a <FrameworkReference>
element for the shared framework. For example:
If targeting .NET Standard (to support versions earlier than ASP.NET Core 3.x), add a package reference to Microsoft.AspNetCore.Mvc.ViewFeatures. The Microsoft.AspNetCore.Mvc.ViewFeatures
package moved into the shared framework and is therefore no longer published. For example:
To connect to your campus Windows PC from a Mac you will need to use the Microsoft Remote Desktop application for Mac version 10.3.8 (or higher). If you are using a university-owned Mac, you may already have this app installed. Get the Remote Desktop client. Follow these steps to get started with Remote Desktop on your Mac: Download the Microsoft Remote Desktop client from the Mac App Store. Set up your PC to accept remote connections. (If you skip this step, you can't connect to your PC.) Add a Remote Desktop connection or a remote resource. Apr 06, 2019 How to access Microsoft Remote Desktop on your Mac by Conner Forrest in Software on June 25, 2018, 7:54 AM PST If you need to access Windows applications through your Mac, a. Microsoft remote desktop mac settings location.
Support multiple ASP.NET Core versions
Multi-targeting is required to author a library that supports multiple variants of ASP.NET Core. Consider a scenario in which a Tag Helpers library must support the following ASP.NET Core variants:
- ASP.NET Core 2.1 targeting .NET Framework 4.6.1
- ASP.NET Core 2.x targeting .NET Core 2.x
- ASP.NET Core 3.x targeting .NET Core 3.x
The following project file supports these variants via the TargetFrameworks
property:
With the preceding project file:
- The
Markdig
package is added for all consumers. - A reference to Microsoft.AspNetCore.Mvc.Razor is added for consumers targeting .NET Framework 4.6.1 or later or .NET Core 2.x. Version 2.1.0 of the package works with ASP.NET Core 2.2 because of backwards compatibility.
- The shared framework is referenced for consumers targeting .NET Core 3.x. The
Microsoft.AspNetCore.Mvc.Razor
package is included in the shared framework.
Alternatively, .NET Standard 2.0 could be targeted instead of targeting both .NET Core 2.1 and .NET Framework 4.6.1:
With the preceding project file, the following caveats exist:
- Since the library only contains Tag Helpers, it's more straightforward to target the specific platforms on which ASP.NET Core runs: .NET Core and .NET Framework. Tag Helpers can't be used by other .NET Standard 2.0-compliant target frameworks such as Unity, UWP, and Xamarin.
- Using .NET Standard 2.0 from .NET Framework has some issues that were addressed in .NET Framework 4.7.2. You can improve the experience for consumers using .NET Framework 4.6.1 through 4.7.1 by targeting .NET Framework 4.6.1.
If your library needs to call platform-specific APIs, target specific .NET implementations instead of .NET Standard. For more information, see Multi-targeting.
Use an API that hasn't changed
Imagine a scenario in which you're upgrading a middleware library from .NET Core 2.2 to 3.0. The ASP.NET Core middleware APIs being used in the library haven't changed between ASP.NET Core 2.2 and 3.0. To continue supporting the middleware library in .NET Core 3.0, take the following steps:
- Follow the standard library guidance.
- Add a package reference for each API's NuGet package if the corresponding assembly doesn't exist in the shared framework.
Use an API that changed
Imagine a scenario in which you're upgrading a library from .NET Core 2.2 to .NET Core 3.0. An ASP.NET Core API being used in the library has a breaking change in ASP.NET Core 3.0. Consider whether the library can be rewritten to not use the broken API in all versions.
If you can rewrite the library, do so and continue to target an earlier target framework (for example, .NET Standard 2.0 or .NET Framework 4.6.1) with package references.
If you can't rewrite the library, take the following steps:
- Add a target for .NET Core 3.0.
- Add a
<FrameworkReference>
element for the shared framework. - Use the #if preprocessor directive with the appropriate target framework symbol to conditionally compile code.
For example, synchronous reads and writes on HTTP request and response streams are disabled by default as of ASP.NET Core 3.0. ASP.NET Core 2.2 supports the synchronous behavior by default. Consider a middleware library in which synchronous reads and writes should be enabled where I/O is occurring. The library should enclose the code to enable synchronous features in the appropriate preprocessor directive. For example:
Use an API introduced in 3.0
Imagine that you want to use an ASP.NET Core API that was introduced in ASP.NET Core 3.0. Consider the following questions:
Microsoft.net In Macbook Pro
- Does the library functionally require the new API?
- Can the library implement this feature in a different way?
If the library functionally requires the API and there's no way to implement it down-level:
- Target .NET Core 3.x only.
- Add a
<FrameworkReference>
element for the shared framework.
If the library can implement the feature in a different way:
- Add .NET Core 3.x as a target framework.
- Add a
<FrameworkReference>
element for the shared framework. - Use the #if preprocessor directive with the appropriate target framework symbol to conditionally compile code.
For example, the following Tag Helper uses the IWebHostEnvironment interface introduced in ASP.NET Core 3.0. Consumers targeting .NET Core 3.0 execute the code path defined by the NETCOREAPP3_0
target framework symbol. The Tag Helper's constructor parameter type changes to IHostingEnvironment for .NET Core 2.1 and .NET Framework 4.6.1 consumers. This change was necessary because ASP.NET Core 3.0 marked IHostingEnvironment
as obsolete and recommended IWebHostEnvironment
as the replacement.
Microsoft.net In Mac Pc
The following multi-targeted project file supports this Tag Helper scenario:
Use an API removed from the shared framework
To use an ASP.NET Core assembly that was removed from the shared framework, add the appropriate package reference. For a list of packages removed from the shared framework in ASP.NET Core 3.0, see Remove obsolete package references.
For example, to add the web API client: