mvc 6 add class library - win-universal-app

I am using VS2015 (RTM) and have a solution with two projects:
1) An MVC 6 ASP.NET Web Application
2) A Windows Split-View App (Universal Windows)
I would like to also add a class library to the solution that can be referenced by both of the projects, but can't find a way to do it.
If I add a Web Class Library (Package), I can reference it via the web application, but not by the Universal Windows App.
If I add a Windows Class Library (Universal Windows), I can reference it in the Universal Windows App, but when I try to add a reference to the MVC 6 Web Application I get a couple of thousand reference errors.
Is there an easy way to do this, i.e. share a class library between an MVC 6 app and a Universal Windows app, or is it a non-starter?

The MVC 6 can’t reference the UWP class library since they are based on the different .NET runtime. MVC 6 is based on the .NET Core or Full .NET, the UWP is based on the .NET for UWP.
I did not have the MVC 6 installed in my machine to test. The portable library should work in this case, but I also failed to compile in MVC 5.
As a workaround, you can considering using the code sharing between UWP project and MVC project.
Create a new folder named share_code in the solution folder, put the common code in this folder. In UWP project and MVC project, Add -> Existing Item, then you can re-use the code in both projects.

Related

Azure app service container crash with "Could not load file or assembly" on ASP.NET Core MVC .NET 6

I am trying to deploy my .NET 6 asp.net core web app but I'm getting a weird error when trying to do so:
I don't understand why it is searching for .NET 7 packages when my project and stack is on 6.
I tried ZIP deploy through VS and automated through GitHub to no avail. My app worked fine the other day all I did was switch to a Basic B1 plan from Standard S1 to reduce cost.
I think the problem is related to your Github Actions. You're building the entire solution, but your project EasyRank.Tests.Common uses a different version of Microsoft.EntityFrameworkCore 7.0.0, while the others are using 6.0.10. Internally it has a dependency on Microsoft.Extensions.DependencyInjection.Abstractions and they are conflicting.

asp.net core 3.1 - Add reference from class library to web application in the same solution

I have an asp.net core 3.1 solution, with web application project and another 2 class library projects.
files architecture
I am trying to add reference from one class library project to the other using Ctrl+".", but it doesn't give an option to do that in the IntelliSense.
How can I do the reference without IntelliSense ? (Adding it manually using CoronaPatients.Core also not working).
How to enable it from the IntelliSense ?
Well I have just discovered the right click on the project ->> Add ->> Project Reference... option, and check the project you want to reference to.
But still, why is it not in the IntelliSense ?

Select .NET or .NET Core on Azure with a ASP.NET Core website

I'm hosting a range of websites on Azure. Some ASP.NET MVC and others ASP.NET Core. I noticed that there is a Stack setting beneath General settings with the values .NET and .NET Core:
For some of my ASP.NET Core websites, the value .NET is selected. Typically the ones that I migrated to ASP.NET Core and just deployed to an existing website previously running ASP.NET MVC. My question here is, what does this setting do? And why doesn't it seem to make a difference when deploying a ASP.NET Core website which setting this has?
In App Service Stack settings are used to set type of language and the version you need to use. App Service support in general supports the following languages:
ASP.NET Core
Node.js
PHP
Python
Java
Ruby
and depend on the OS say,
if you create on windows, there are 5 stacks underneath it
.NET
.NET Core
PHP
Python
Java
If you choose linux, there are 7 stacks can selected on portal
Ruby
Node
PHP
.NET Core
Java8
Java11
Python
Here are the details on the stack settings

Azure DevOps fails with error /usr/share/dotnet/sdk/2.2.105/NuGet.targets(499,5): error : Could not find a part of the path '/tmp/NuGetScratch

I am Developing an Azure Function solution where I have 2 class library and one Azure Function projects. I have already setup the Azure DevOps build and release pipelines. With my recent changes I am getting an error as /usr/share/dotnet/sdk/2.2.105/NuGet.targets(499,5): error : Could not find a part of the path '/tmp/NuGetScratch whenever the azure build pipeline is running.
I am not sure what made this problem. Any help is really appreciated.
I just figured out that the issue is with the project target framework. All my projects in the solution are in .Net Core 2.1 except one project (class library) was in .Net Standard. This was a mistake I had done while creating the class library project, I selected class library (.NET Standard) instead of selecting Class Library (.NET Core).
I removed that project (both from visual studio and file explorer) and create a new project with the same name but this time by selecting Class Library (.NET Core) and then copied my classes to this project.
That fixed my issue. Hope it helps.

Is there any way to use ajaxcontroltoolkit textditor in asp.net mvc5

I am developing asp.net mvc5 project and now I want to use text editor in the project so I have downloaded richtexteditor from nuget to the mvc project but I do not know how to use thisin the prohect .please help me to solve this problem
Ajax Control Toolkit can not be used in ASP.NET MVC projects, only non-MVC ASP.NET projects.

Resources