简体   繁体   English

F#项目默默地更新我的引用

[英]F# project silently updates my references

I have an F# project in Visual Studio 2012 and I'm trying to reference a specific version of certain assemblies. 我在Visual Studio 2012中有一个F#项目,我正在尝试引用某些程序集的特定版本。 However, whenever I compile and run the application, the references change to a newer version. 但是,每当我编译并运行应用程序时,引用都会更改为更新的版本。

I can remove all references then add them back like this: 我可以删除所有引用,然后像这样添加它们: 在构建之前

Then after I compile and run it once, if I go back to the reference manager, I see this: 然后在我编译并运行一次之后,如果我回到参考管理器,我会看到: 建成后

What's happening here and is there any way to prevent it? 这里发生了什么,有什么办法可以阻止它吗?

I have seen this once with Office references in VS2012. 我在VS2012中看过一次Office引用。

I think for some reason the change is not persisted back to the project file. 我认为由于某种原因,更改不会持久化回项目文件。 And the compiler uses the file, which is reloaded when you check the references 编译器使用该文件,在检查引用时会重新加载该文件

The answer was to right click -> unload the project, then right-click again and edit the project file. 答案是右键单击 - >卸载项目,然后再次右键单击并编辑项目文件。 By manual inspection, make sure the references are OK. 通过手动检查,确保参考正常。 Then just save the file and you should be good to go. 然后只需保存文件,你应该好好去。

This bug in VS has been corrected now VS中的这个错误现在已得到纠正

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM