One or more errors occurred. (Cannot find compilation library location for package 'Microsoft.NETCore.App') (ca5ca414)
See original GitHub issueI have my .NET Core 2.2 library that has an unexpected behavior on my IIS Server.
I got this issue One or more errors occurred. (Cannot find compilation library location for package ‘Microsoft.NETCore.App’) (ca5ca414).
Note that this issue doesn’t happened when I run the project locally.
Also, I don’t use embedded template, I use string as template.
I tried to put in my .csproj (of my library and in my web app (.Net core API 2.2)) :
< MvcRazorExcludeRefAssembliesFromPublish>false</ MvcRazorExcludeRefAssembliesFromPublish> < CopyRefAssembliesToPublishDirectory>false< /CopyRefAssembliesToPublishDirectory> < MvcRazorCompileOnPublish>false< /MvcRazorCompileOnPublish> < PreserveCompilationContext>true< /PreserveCompilationContext>
Without any result.
Code :
FluentEmail.Core.Email.DefaultRenderer = new RazorRenderer();
var sender = new MailgunSender("@@@", "@@@");
FluentEmail.Core.Email.DefaultSender = sender;
var fluentEmail = FluentEmail.Core.Email
.From(email.Sender)
.To(email.Recipient.Email)
.Subject(email.Content.Subject)
.UsingTemplate(template, content);
var response = await fluentEmail.SendAsync();
- OS: Windows Server 2016
- Platform NET Core 2.2
- RazorLight version 2.0-beta1
C:\Users\Administrator>dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.2.105
Commit: 7cecb35b92
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.2.105\
Host (useful for support):
Version: 2.2.3
Commit: 6b8ad509b6
.NET Core SDKs installed:
2.1.503 [C:\Program Files\dotnet\sdk]
2.2.100 [C:\Program Files\dotnet\sdk]
2.2.103 [C:\Program Files\dotnet\sdk]
2.2.105 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Publish command :
dotnet.exe publish ProjectName.sln --output C:\TeamCity\buildAgent\work\706005865bacd71f/output @C:\TeamCity\buildAgent\temp\agentTmp\5d3f2082f93940649580add5b1a8d1a2.rsp
There is anything that I miss ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top GitHub Comments
In case you wonder, that’s the proper fix, just add these property groups to your entry point csproj. It has to be the entry point project, so the ASP.NET core web project, or your console project, etc
This worked for me ! thanks