Visual Studio C#解决方案生成的$ RANDOM_SEED $文件是什么? [英] What is the $RANDOM_SEED$ file generated by Visual Studio build of C# solution?

查看:133
本文介绍了Visual Studio C#解决方案生成的$ RANDOM_SEED $文件是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们注意到,在一台开发人员的计算机上,Visual Studio(2015年更新3)的C#解决方案调试版本正在与每个生成的DLL一起生成$ RANDOM_SEED $文件.

We noticed that on a certain dev machine a Visual Studio (2015 update 3) debug build of a C# solution was generating a $RANDOM_SEED$ file alongside every built DLL.

文件内容只是一个数字,例如 1443972318

The content of the file is just a single number e.g. 1443972318

删除文件然后重新生成导致重新生成的文件,其编号不同.

Deleting the file(s) then rebuilding resulted in the file being regenerated, with a different number.

在解决方案中重建单个项目(仅具有标准C#项目引用/依赖关系+ System.Management的项目)时,也观察到此行为.

This behaviour was also observed when rebuilding a single project in the solution (one which has only the standard C# project refs/dependencies + System.Management).

请注意,运行命令行例如 msbuild <sln-file> 重新生成文件(用于构建完整的解决方案或单个项目).

Note that running a command line build e.g. msbuild <sln-file> did not regenerate the file (for build of complete solution or single project).

VS重新启动后,不再重新生成文件.

据我们所知,我们的任何源代码,构建步骤或内部依赖项均未使用此文件名. .NET框架类有很多依赖项,包括Random和RNGCryptoServiceProvider以及外部依赖项.我们没有所有这些代码的完整源代码,因此无法详尽检查是否有任何依赖项负责.

As far as we know this file name is not used in any of our source code, post build steps or internal dependencies. There are quite a few dependencies on .NET framework classes, including Random and RNGCryptoServiceProvider, and also external dependencies. We don't have complete source code for all these so it's not possible to check exhaustively which if any of the dependencies are responsible.

这是一个黑暗的镜头,但问题是有人看见过类似的东西吗?

This is a bit of a shot in the dark but the question is has anyone seen anything similar to this?

编辑 我对此并不感到惊讶-我很欣赏它是开放式的,但是由于我目前无法重现它,并且它可能会带来潜在的严重后果(随机数生成器攻击?),所以我还是张贴了它.如果我能够进行复制,我当然会在这里进行更新.

EDIT I'm not surprised this has been downvoted - I appreciate it is pretty open ended, but as I'm currently not able to reproduce this and as it could have potentially serious consequences (random number generator attack?) I have posted it anyway. If I am able to repro I will of course update here.

推荐答案

我有相同的文件. 经过简短的调查,我发现有罪: 该文件由NUnit 3.x测试适配器创建. (您可以从NUnit适配器源代码的AdapterSettings.cs中对其进行检查.)

I have the same file. After a short investigation I found guilty: this file is created by NUnit 3.x test adapter. (You can check it in AdapterSettings.cs from NUnit adapter source code).

这篇关于Visual Studio C#解决方案生成的$ RANDOM_SEED $文件是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆