Closed HamiltonManalo closed 4 years ago
What does your csproj look like?
Also, when you say MSIX/AppXPackage, which one? Aren't they different? What tool are you using to build the package? I'm not familiar with all the ways Microsoft offers to package things. A good source I use is the Installer Dude on Stack Overflow.
Also, did you try googling the error - there is literally only one search result for this error and it's this answer: https://stackoverflow.com/a/32810288/1040437
What does your csproj look like?
Also, when you say MSIX/AppXPackage, which one? Aren't they different? What tool are you using to build the package? I'm not familiar with all the ways Microsoft offers to package things. A good source I use is the Installer Dude on Stack Overflow.
Also, did you try googling the error - there is literally only one search result for this error and it's this answer: https://stackoverflow.com/a/32810288/1040437
Thank you for the quick reply!
Yes I did google the error, unfortunately for me this solution is for the ClickOnce application installer, because we've moved our codebase to .Net Core we're deploying the application using the AppX package via Windows Application Packaging in visual studio. The application is deployed across the organization, however only PC's on windows 1909 seem to experience any issues with RazorLight. I will close the issue as it doesn't seem I can offer any productive steps to recreate it at this time.
Again thank you for your help!
I would try stepping through the various suggestions in our FAQ. The thing that is frustrating with .NET "framework dependencies" is there is a lot of knobs that influence the linker-loader, and, whereas most engineers were accustomed to looking closely at their App.Config and seeing bindingRedirects, almost no engineers ever look at their .deps.json file and runtime.json file.
This write up is coming a bit late but I was able to correct the issue. Unfortunately it required me to import the razorlight project and make a change to the way assemblies are excluded. I spent a good deal of time investigating the issue and I wasn't able to find anything quite the same. My best guess is that it is an issue with calling ResolveReferencePaths()
on assemblies containing winmd files.
In #369 I added a filter prior to calling ResolveReferencePaths()
and it prevented the exception. I'd love to get this change, or a similar one integrated with the nuget package so I could remove the razorlight project from the solution. There is some duplication because further down in the method it does attempt to exclude again, but I'm not sure how else to implement this fix, given where the exception is thrown.
I am also of unsure on how to create a unit test - or if one is really required. My best attempt would be adding the package in question (SDK contracts), but that would require excluding the package throughout the test suite. Any feedback would be welcome on this.
Describe the bug A clear and concise description of what the bug is. On an MSIX/AppXPackage deployment, RazorLight compilation throws the error listed below. On local installation of the deployment the error is not encountered. I suspect it's due to the windows 1909 update but I'm unsure of how to go about debugging it. Would anyone be able to advise?
To Reproduce Steps to reproduce the behavior: Unable to reproduce locally
Expected behavior Razorlight generates a template
Information (please complete the following information):
Additional context Add any other context about the problem here.
Using the original method of the windows.winmd metadata file
Using the new method of Microsoft.Windows.SDK.Contracts