dotnet / aspnetcore Public
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
Upgrading from 5.0 to 6.0 yields InvalidOperationException: Cannot find compilation library location for package 'System.Security.Cryptography.Pkcs #38892
Comments
I'm also experiencing the same issue. I've upgraded a web project from net5.0 to net6.0. Callstack: Runtime:
|
Do you happen to have a minimal app that reproduces the issue? We haven't seen previous reports of this so it's difficult to tell what might be going wrong. |
Hi @shapeh. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
I'm seeing this as well. I have a hunch that it has to do with DataProtection, but I haven't narrowed it down yet. Also, FWIW, it only happens when running a debug build in IIS, not IISExpress. A hack that's working for me right now is to add
|
@ChadBurggraf, Thnx. |
If anybody has a small repro, please feel free to post it. I don't have one unfortunately. |
@bartonjs as an FYI |
Had the same problem after updating web project from 3.1 to 6.0. One library hich has a reference to System.Security.Cryptography.Xml was dependent explicitly as well as transitive library, but was not used in the project. After removing explicit reference (it still referenced implicitly) project works again. Also, this error is not consistent - out of 4 dev environments, only two exerienced the problem, other two does not. No repro available. Stacktrace
|
I had to remove Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation to fix this error. |
Thank you for filing this issue. In order for us to investigate this issue, please provide a minimalistic repro project (ideally a GitHub repo) that illustrates the problem. |
Hi @shapeh. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. See our Issue Management Policies for more information. |
Update: It seems to happen only when using IIS to run the application in Debug / VS 2022. If I am using IIS Express via VS 2022 the problem does not arise. |
had the same issue, added Microsoft.Build as package reference and did the same hack @ChadBurggraf suggested. |
Since you asked for a minimal example to reproduce, here one is: Here's what it's supposed to look like (works with IIS Express): Here's what it looks like with IIS when I apply the manual DLL copy hack (this is sort of broken, but not within the scope of this discussion, so you can essentially consider this working as expected): Here's what it looks like with IIS without the manual DLL copy hack: As you can see, that shows the error mentioned in this issue. Some info about this project: this is a basic Umbraco 9 install, with the addition of PuppeteerSharp to enable server side rendering. |
Describe the bug
Just upgraded a web project to .NET 6.0. Project compiles but when I run the site I get the following error:
InvalidOperationException: Cannot find compilation library location for package 'System.Security.Cryptography.Pkcs'.
To Reproduce
Upgrade a ASP.NET 5.0 project to ASP.NET 6.0
Exceptions (if any)
Further technical details
Please see MiniProfiler/dotnet#587 - I thought it was related to MiniProfiler but it appears others have the same problem. Issue happens only in Debug mode - Release mode does not produce this error.
dotnet --info Output
The text was updated successfully, but these errors were encountered: