在项目的Properties文件夹中,应该(至少)有两个文件,Resources.resx和Resources.Designer.cs,后一个文件显示在Visual Studio的Solution Explorer中的Resources.resx下的较低级别.在我的例子中,Resources.Designer.cs文件以某种方式不再包含在项目中.这可以通过编辑(或恢复.csproj文件的旧副本)来修复.
在信用到期的情况下,我在这里找到了这个解决方案:http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/ebeca7a8-c7a3-4cb6-a40e-89c5fdb70c82在NJLASSI的回答中.
编辑:
解决这个并不像我最初想的那么简单,所以最好是.csproj文件的旧副本可用,以便可以从那里恢复相关的行.以下是适用的行:
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
Run Code Online (Sandbox Code Playgroud)
和
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
10008 次 |
最近记录: |