严重性 代码 说明 项目 文件 行 禁止显示状态
错误 CS1508 此程序集中已使用了资源标识符“BMap.NET.WindowsForm.BMapControl.resources” BMap.NET.WindowsForm D:\MySource\Decompile\BMap.NET.WindowsForm\CSC 1 活动
运行程序时,提示有错误:此程序集中已使用了资源标识符 "Test.Searchn.resources",双击该条记录,发现提示:无法打开该文档。它已被重命名、删除或移动。
不能启动的工程项目文件多了如下的标签。
Test.csproj
1 2 3 4 | < EmbeddedResource Include = "Test/Search.resx" > < DependentUpon >Search.cs</ DependentUpon > < SubType >Designer</ SubType > </ EmbeddedResource > |
Test.csproj.user
1 2 3 | < PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " > < StartWorkingDirectory >G:/Test/bin/Debug/</ StartWorkingDirectory > </ PropertyGroup > |
最后把 Test.csproj文件中多出的标签去掉,运行就可用了。
分析:
项目文件中的其他的资源都是采用的如下方式描述的。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | < EmbeddedResource Include = "Test.Play.resources" /> < EmbeddedResource Include = "Test.Properties.Resources.resources" /> < EmbeddedResource Include = "Test.ScenePropertyForm.resources" /> < EmbeddedResource Include = "Test.Layer.SDBLayerCtrl.resources" /> < EmbeddedResource Include = "Test.Search.resources" /> < EmbeddedResource Include = "Test.SearchForm.resources" /> < EmbeddedResource Include = "Test.SelectForm.resources" /> < EmbeddedResource Include = "Test.SelectSearch.resources" /> < EmbeddedResource Include = "Test.SimpleGeoLine3D.resources" /> < EmbeddedResource Include = "Test.SimpleModelFeatures.resources" /> < EmbeddedResource Include = "Test.SimplePanelLine.resources" /> < EmbeddedResource Include = "Test.SimpleRegionStyle.resources" /> < EmbeddedResource Include = "Test.SimpleStyleControl.resources" /> < EmbeddedResource Include = "Test.StartForm.resources" /> < EmbeddedResource Include = "Test.StyleControl.resources" /> < EmbeddedResource Include = "Test.TitleForm.resources" /> < EmbeddedResource Include = "Test.ViewControl.resources" /> < EmbeddedResource Include = "Test.ViewInCar.resources" /> |
而我们自己的标签中却写了.resx资源,它肯定找不到。所以以后兄弟们遇见该问题采用相同的方法,说不准可以解决问题呢。
删除掉多余的RES!
————————————————————————————————————————
删除后,改成: