如何在Visual Studio 2013中解锁“锁定”文件?

问题描述

我意外地将所有项目文件都锁定在VS 2013中。 现在,当我编辑资源文件并重建时,我得到了

error MSB6006 exited with code 1

enter image description here

文件被锁定的可能原因:

  1. 手动编辑.rc文件(删除长注释....)
  2. 添加安装项目

解决方法

首先,如果要从git源代码管理中解锁资源文件,则可以修改解决方案文件夹中的.gitignore文件,添加要从源代码管理中排除的所有文件。该文件保存将从git中排除的文件。或者只是运行git命令:

git reset -- <file>
git rm --cached <file>

请检查有关ignoring file changes with Git的文档。

,您还可以删除.git隐藏文件夹。

我刚收到“致命错误RC1022:预期为'#endif'” 更改控件名称

您应该注意以下信息:Resource Compiler Fatal Error RC1022

An #if,#ifdef,or #ifndef directive was not terminated with an #endif directive.

Make sure that there is an #if,or #ifndef statement in effect before this statement.

请注意,您应使用以#if结尾的#ifdef#ifndef#endif

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...