Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
| Value | |
|---|---|
| Rule ID | IL3001 |
| Category | SingleFile |
| Fix is breaking or nonbreaking | Nonbreaking |
Cause
When you publish an app as a single file (for example, by setting the PublishSingleFile property to true in a project), calling the Assembly.GetFile(s) methods for
assemblies embedded inside the single-file bundle always throws an exception, as these methods aren't single-file compatible.
How to fix violations
To embed files in assemblies in single-file bundles, consider using embedded resources and the Assembly.GetManifestResourceStream method.
When to suppress warnings
It's appropriate to silence this warning if the assembly being accessed is definitely not in the single-file bundle. The assembly might not be in the bundle if the assembly is loaded dynamically from a file path.