Closed hyke123 closed 1 year ago
There is no strong name support in .NET Core / .NET 5+. StrongName
class is provided for some minimal backward compatibility, but there is no point in using it.
How should I rewrite the following code to work with the ported NuGet package?
byte[] publicKey = new byte[8] { 0x51, 0xaa, 0x82, 0xef, 0x09, 0x17, 0x96, 0x80 };
StrongName sn = new StrongName(new StrongNamePublicKeyBlob(publicKey), "Bridge.PDC.Report.Function", new Version("2.0.0.0"));
report.AddFullTrustModuleInSandboxAppDomain(sn);
You shouldn't need to call AddFullTrustModuleInSandboxAppDomain
in your code for your report to work, but keep in mind all the report code runs with full trust and there is no way to change that, since .NET Core has no support for CAS. If your report comes from untrusted source, implement some other sandboxing techniques.
If I don't call AddFullTrustModuleInSandboxAppDomain in .NET Core, the report isn't created. It seems that the report's definition contains custom code from the assembly Bridge.PDC.Report.Function.dll Not calling AddFullTrustModuleInSandboxAppDomain in .NET Framework works on the other side.
Please provide either a stack trace of all thrown exceptions or a way to reproduce the problem using one of the sample projects in this repo.
LocalReport.AddFullTrustModuleInSandboxAppDomain(StrongName name)
How can i set assemblyInfo to StrongName argument?Thanks