我在我的几个项目中使用了Dapper 1.37和Dapper.SimpleCRUD 1.3.0,作为NuGet包添加。
随着时间的推移,Visual Studio(2013 update 4)已经停止,需要10或20秒才能将每个源文件加载到编辑器中。 使用进程监视器查看其操作系统活动,我看到它在每次文件加载时遍历整个解决方案的目录,尝试在每个目录中创建/打开 SqlMapper.cs。
解决方案目录中每个项目 (PROJECT_PATH) 中的每个子目录在进程监视器跟踪中都有一系列事件,如下所示:
4:04:11.5955306 p.m. devenv.exe 8368 FASTIO_NETWORK_QUERY_OPEN PROJECT_PATHlib FAST IO DISALLOWED
4:04:11.5955677 p.m. devenv.exe 8368 IRP_MJ_CREATE PROJECT_PATHlib SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
4:04:11.5956773 p.m. devenv.exe 8368 FASTIO_QUERY_INFORMATION PROJECT_PATHlib SUCCESS Type: QueryBasicInformationFile, CreationTime: 8/07/2014 2:12:02 p.m., LastAccessTime: 8/07/2014 2:12:02 p.m., LastWriteTime: 8/07/2014 2:12:02 p.m., ChangeTime: 8/07/2014 2:12:02 p.m., FileAttributes: D
4:04:11.5956858 p.m. devenv.exe 8368 IRP_MJ_CLEANUP PROJECT_PATHlib SUCCESS
4:04:11.5956948 p.m. devenv.exe 8368 IRP_MJ_CLOSE PROJECT_PATHlib SUCCESS
4:04:11.5957298 p.m. devenv.exe 8368 FASTIO_NETWORK_QUERY_OPEN PROJECT_PATHlibDevdapper-dot-netDapper NET40SqlMapper.cs FAST IO DISALLOWED
4:04:11.5957464 p.m. devenv.exe 8368 IRP_MJ_CREATE PROJECT_PATHlibDevdapper-dot-netDapper NET40SqlMapper.cs PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
4:04:11.5957751 p.m. devenv.exe 8368 FASTIO_NETWORK_QUERY_OPEN PROJECT_PATHlibdapper-dot-netDapper NET40SqlMapper.cs FAST IO DISALLOWED
4:04:11.5957902 p.m. devenv.exe 8368 IRP_MJ_CREATE PROJECT_PATHlibdapper-dot-netDapper NET40SqlMapper.cs PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
4:04:11.5958125 p.m. devenv.exe 8368 FASTIO_NETWORK_QUERY_OPEN PROJECT_PATHlibDapper NET40SqlMapper.cs FAST IO DISALLOWED
4:04:11.5958237 p.m. devenv.exe 8368 IRP_MJ_CREATE PROJECT_PATHlibDapper NET40SqlMapper.cs PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
使用相同解决方案的其他开发人员不会获得引用 SqlMapper.cs 的事件。 我试过:
- 删除所有 Dapper NuGet 包
- 从我找到它的所有项目中删除 Dapper.pdb 和 Dapper.SimpleCRUD.pdb。
- grep SqlMapper 的整个解决方案.cs以查看引用它的内容(仅.pdb文件)
- 添加一个 SqlMapper.cs在它的第一个目录中在中查找它 - 消除"找不到路径"消息目录,但继续扫描所有其他目录。
希望有人能帮助我回到过去的活泼日子......
我重新克隆了我的存储库。
问题消失了。