VS2013修改resource之后产生designer1.cs

本文提供了一种解决Visual Studio中资源文件生成错误的方法,包括卸载和重新安装项目,编辑项目文件,修改资源文件的生成输出路径,删除错误的资源文件,并重新加载项目,最后运行自定义工具。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 卸载项目
2. 编辑项目文件
3. 搜索<LastGenOutput>resources1.Designer.cs</LastGenOutput>
4.更改为<LastGenOutput>resources.Designer.cs</LastGenOutput>
5. 删除resources.designer.cs和resources1.designer.cs
6. 重新加载项目,右键选择resources.resx,选择“运行自定义工具”

转载于:https://www.cnblogs.com/mohanchen/p/9922336.html

<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <PropertyGroup> <ProjectType>local</ProjectType> <ProjectVersion>7.10.377</ProjectVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{ADC5A455-0A27-4553-B7AA-BF869BCD8EB1}</ProjectGuid> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <AssemblyName>LinuxCmd</AssemblyName> <OutputType>WinExe</OutputType> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <IsWebBootstrapper>false</IsWebBootstrapper> <PublishUrl>publish\</PublishUrl> <Install>true</Install> <InstallFrom>Disk</InstallFrom> <UpdateEnabled>false</UpdateEnabled> <UpdateMode>Foreground</UpdateMode> <UpdateInterval>7</UpdateInterval> <UpdateIntervalUnits>Days</UpdateIntervalUnits> <UpdatePeriodically>false</UpdatePeriodically> <UpdateRequired>false</UpdateRequired> <MapFileExtensions>true</MapFileExtensions> <ApplicationRevision>0</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> <UseApplicationTrust>false</UseApplicationTrust> <BootstrapperEnabled>true</BootstrapperEnabled> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PlatformTarget>x86</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PlatformTarget>x86</PlatformTarget> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <StartupObject>LinuxCmd.Program</StartupObject> </PropertyGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <ItemGroup> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <EmbeddedResource Include="LinuxCmd\frMain.resx"> <DependentUpon>frMain.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <Reference Include="NAudio, Version=1.7.2.19, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>.\NAudio.dll</HintPath> </Reference> <Reference Include="SDK, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>.\SDK.dll</HintPath> </Reference> <Reference Include="System.Windows.Forms" /> <Reference Include="System" /> <Reference Include="System.Drawing" /> <Compile Include="AssemblyInfo.cs" /> <Compile Include="Global.cs" /> <Compile Include="LinuxCmd\LinuxEvent.cs" /> <Compile Include="LinuxCmd\BluetoothScanEvent.cs" /> <Compile Include="LinuxCmd\frMain.cs"> <SubType>Form</SubType> </Compile> <Compile Include="LinuxCmd\LinuxUdp.cs" /> <Compile Include="LinuxCmd\PlayController.cs" /> <Compile Include="LinuxCmd\Properties\Resources.cs" /> <Compile Include="LinuxCmd\DevItem.cs" /> <Compile Include="LinuxCmd\AudioEvent.cs" /> <Compile Include="LinuxCmd\RTPManager.cs" /> <Compile Include="LinuxCmd\WaveRecordDataHandler.cs" /> <Compile Include="LinuxCmd\RecordController.cs" /> <Compile Include="LinuxCmd\WaveRecorder.cs" /> <Compile Include="LinuxCmd\WaveErrorEventHandler.cs" /> <Compile Include="LinuxCmd\ATClient.cs" /> <Compile Include="LinuxCmd\LinuxSendSocket.cs" /> <Compile Include="LinuxCmd\Program.cs" /> <Compile Include="LinuxCmd\AudioManager.cs" /> <Compile Include="LinuxCmd\UdpBrocast.cs" /> <Compile Include="LinuxCmd\Properties\Settings.cs" /> <EmbeddedResource Include="LinuxCmd.Properties.Resources.resources" /> <EmbeddedResource Include="LinuxCmd.frMain.resources" /> </ItemGroup> <ItemGroup> <Content Include="LinuxCmd.ini"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> <Visible>False</Visible> <ProductName>.NET Framework 3.5 SP1</ProductName> <Install>true</Install> </BootstrapperPackage> </ItemGroup> </Project>
最新发布
07-11
System.Resources.MissingManifestResourceException HResult=0x80131532 Message=未能找到任何适合于指定的区域性或非特定区域性的资源。请确保在编译时已将“RxjhServer.Form1.resources”正确嵌入或链接到程序集“GameServer”,或者确保所有需要的附属程序集都可加载并已进行了完全签名。 Source=mscorlib StackTrace: 在 System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName) 在 System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark) 在 System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark) 在 System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) 在 System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream) 在 System.Resources.ResourceManager.GetObject(String name) 在 RxjhServer.Form1.InitializeComponent() 在 G:\软件安装包\源码项目\全套\永恒科技23.0\源码\GameServer\GameServer\RxjhServer\Form1.Designer.cs 中: 第 180 行 在 RxjhServer.Form1..ctor() 在 G:\软件安装包\源码项目\全套\永恒科技23.0\源码\GameServer\GameServer\RxjhServer\Form1.cs 中: 第 29 行 在 RxjhServer.Program.Main() 在 G:\软件安装包\源码项目\全套\永恒科技23.0\源码\GameServer\GameServer\RxjhServer\Program.cs 中: 第 15 行
07-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值