Reputation: 104
Since few days my Visual Studio 2022 does not open xslt files. It open other files even xml. Since now I use separated xsl files but when I make project xslt files still doesn't work
Do anyone have such problem?
What can't allow transformation files be debugged by vs2022.
Last week I have encrypted disc by bitlocker. How do you think is possible that is source of my problem.
When I try debug xslt with xml i exit with error Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401) When I open xslt file only i have this error in error list but file are open.
I googled:
File Trust and Location: Ensure the XSL file is in a trusted folder (e.g., Desktop, C:\Temp), and verify it is not blocked in the properties. I try it
Modify Visual Studio Config: Add the entry to devenv.exe.config to prevent security trust issues. Itry it
BitLocker Encryption: If the file is on an encrypted drive, try temporarily disabling BitLocker for that drive. I still does not try it. Computer is not owned by me. My boss require encrypted drive.
Run Visual Studio as Administrator: This can bypass certain permission issues related to loading XSLT files. I try it.
What I should try. where I can manage xslt files behawior in visual studio
Upvotes: 0
Views: 240
Reputation: 1
I had the same issue following an update to Visual Studio. I saw that the .NET Runtime Optimization Service was running the background. After it had completed and I cleaned and rebuilt my solution, the errors had gone. I think you may just have to wait for the Runtime Optimization to complete and then it should work.
Upvotes: 0
Reputation: 131
Same issue. Over-the-top annoying to wake up with an hour of XSL work to go on a three week project to find an overnight machine update and no functioning XSL debugger (which frankly is the only reason I have a VS Pro license). I found this: https://sharepoint.stackexchange.com/questions/118317/loading-this-assembly-would-produce-a-different-grant-set-from-other-instances with a tip to set the LoaderOptimization value (DWORD, 1) at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework
Relaunch VS and I can now run the debugger. I get an extra output that says "Warning: 'System.Data.SqlXml' is not loaded from the Native Image Cache. That affects accuracy of timing information." That likely tells us the Dll with the problem and possible fix (clear and reset the cache, which probably means fiddling with the ngen utility).
Someone else can pick up the cache angle and try to get this running without the LoaderOptimization flag.
Upvotes: 0