-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find compilation library location for package 'Microsoft.NETCore.App' #203
Comments
In my case, this problem happen, when I set |
I solve the problem, putting this on csproj
The key is the "MvcRazorExcludeRefAssembliesFromPublish" tag |
I have the same problem with netcore 2.0 but sadly this doesn't resolve my issue. I'm still getting
Any other ideas how this could be resolved? EDIT: |
I had the same problem and @penihel solution has worked for me! |
Can anyone shed any more light on this issue? It works in Dev, but when i publish to folder, zip and deloy, I get this error. I have included the aforementioned lines into the proj file. I am loading the templates by file path, and these cshtml files did not get published, even though they are set as content and copy always. Any thoughts/Guidance would be very much appreciated. |
@OblivionSY I had the same problem and the easiest solution was to embed the cshtml files in the project. |
@RemoteUserHrs Thanks, but that isn't really an option if you need to be able to edit the files quickly. What I ended up doing was putting this in the first section in the project: Can't remember if I tweaked anything else, but now my publish folder includes a refs folder with all the aspnet core dlls and it seems to have gone away. I may revist this, but since the site was due to go live today it was a case of quickest fix wins. |
Following suggestions from various links (couple displayed below) - toddams/RazorLight#203 - OrchardCMS/OrchardCore#1156
Hey everybody, I ran into the same issue. Unfortunately I was not able to find the solution helped me. @OblivionSY your sample (#203 (comment)) has the latest line commented which is original one from the @penihel response (#203 (comment)). So I'm a bit confusing. I'm using dotnetcore2.1. I have the Email service library with the templates inside as an Embedded resources + main WebApp with the regular .cshtml pages. So I have added the referenced sections to the library project. I have tried Azure DevOps Build\Release process as well as publishing from VS2017 manually. No luck. I have also tried to remove the I ended up with all 3 parameters:
Here is the stack trace from Azure:
Package versions:
Do you have any ideas guys\girls? |
I am using this package |
The main problem in using Library for storing the Embedded Views. Here is an explanation: aspnet/Mvc#6021 So I had to clean up the library |
|
This kind of problem happen me a lot, usally in old app services not updated to the latest changes on asp net core environment. So one of my works arounds is to create a new deployment slot and publish to the new slot. Usually this kind of errors solved in the new slot i dont know why but i guess it forces azure to create a new "image" with the latest updates on the runtime, then I just need to switch the slots. |
Here's a very useful solution to this problem. When publishing, view the Settings. There's an outdated assembly that's causing problems, and this should clear it for you. |
this resolve in .net core 3.1. |
Getting this same error upgrading a project from .NET Core 5.0 to .NET Core 6.0. Nothing above has solved this issue yet. |
@xantari This issue is about .NET Core 2.1 and .NET Core 3.1. |
This issue is now locked. If the FAQ in the README or @penihel 's suggestion does not work, open a new issue and follow the issue template. Also try to create a repro , as that will likely solve your problem through explaining it to yourself. |
Describe the bug
My code run ok on developer machine. But not in Azure WebApp production.
Im using .Net Core 2.1. I get this error
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Information (please complete the following information):
Plataform: .NET Core 2.1
The text was updated successfully, but these errors were encountered: