Khi cố gắng để lập dự án C# của tôi, tôi nhận được lỗi sau:Resource không hợp lệ tập tin
'C:\Documents and Settings\Dan\Desktop\Rowdy Pixel\Apps\CleanerMenu\CleanerMenu\obj\Debug\CSC97.tmp' is not a valid Win32 resource file.
Sau khi trải qua nhiều tìm kiếm của Google, tôi đã xác định rằng điều này thường được gây ra bởi một hình ảnh 256x256 bên trong một biểu tượng sử dụng bởi dự án. Tôi đã đi qua tất cả các biểu tượng và loại bỏ các phiên bản 256x256, nhưng lỗi vẫn tồn tại. Bất kỳ ý tưởng về làm thế nào để thoát khỏi điều này?
@Mike: Nó xuất hiện một cách bí ẩn một đêm. Tôi đã tìm kiếm các tập tin csproj, nhưng không có đề cập đến một CSC97.tmp (Tôi cũng đã kiểm tra các tập tin giải pháp, nhưng tôi đã không có may mắn có một trong hai). Trong trường hợp nó giúp, tôi đã đăng contents of the csproj file on pastebin.
@Derek: Không sao cả. Đây là đầu ra của trình biên dịch.
------ Build started: Project: Infralution.Licensing, Configuration: Debug Any CPU ------
Infralution.Licensing -> C:\Documents and Settings\Dan\Desktop\Rowdy Pixel\Apps\CleanerMenu\Infralution.Licensing\bin\Debug\Infralution.Licensing.dll
------ Build started: Project: CleanerMenu, Configuration: Debug Any CPU ------
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /main:CleanerMenu.Program /reference:"C:\Documents and Settings\Dan\Desktop\Rowdy Pixel\Apps\CleanerMenu\Infralution.Licensing\bin\Debug\Infralution.Licensing.dll" /reference:..\NotificationBar.dll /reference:..\PSTaskDialog.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:obj\Debug\Interop.IWshRuntimeLibrary.dll /debug+ /debug:full /optimize- /out:obj\Debug\CleanerMenu.exe /resource:obj\Debug\CleanerMenu.Form1.resources /resource:obj\Debug\CleanerMenu.frmAbout.resources /resource:obj\Debug\CleanerMenu.ModalProgressWindow.resources /resource:obj\Debug\CleanerMenu.Properties.Resources.resources /resource:obj\Debug\CleanerMenu.ShortcutPropertiesViewer.resources /resource:obj\Debug\CleanerMenu.LocalizedStrings.resources /resource:obj\Debug\CleanerMenu.UpdatedLicenseForm.resources /target:winexe /win32icon:CleanerMenu.ico ErrorHandler.cs Form1.cs Form1.Designer.cs frmAbout.cs frmAbout.Designer.cs Licensing.cs ModalProgressWindow.cs ModalProgressWindow.Designer.cs Program.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs Scanner.cs ShortcutPropertiesViewer.cs ShortcutPropertiesViewer.Designer.cs LocalizedStrings.Designer.cs UpdatedLicenseForm.cs UpdatedLicenseForm.Designer.cs
error CS1583: 'C:\Documents and Settings\Dan\Desktop\Rowdy Pixel\Apps\CleanerMenu\CleanerMenu\obj\Debug\CSC97.tmp' is not a valid Win32 resource file
Compile complete -- 1 errors, 0 warnings
------ Skipped Build: Project: CleanerMenu Installer, Configuration: Debug ------
Project not selected to build for this solution configuration
========== Build: 1 succeeded or up-to-date, 1 failed, 1 skipped ==========
Tôi cũng đã tải lên biểu tượng tôi đang sử dụng. Bạn có thể view it here.
@Mike: Cảm ơn! Sau khi xóa mọi thứ trừ hình ảnh 32x32, mọi thứ đều hoạt động tốt. Bây giờ tôi có thể quay lại và thêm các kích thước khác từng người một để xem cái nào làm tôi đau buồn. :)
@Derek: Vì lần đầu tiên tôi gặp lỗi, tôi đã thực hiện cài đặt lại hoàn toàn Windows (và cùng với nó, SDK.) Đó không phải là lý do chính cho việc cài đặt lại, nhưng tôi đã có mỏng hy vọng rằng nó sẽ sửa chữa vấn đề.
Bây giờ chỉ khi tôi có thể tìm ra lý do tại sao nó đã từng làm việc với tất cả các kích thước khác ...
Vui lòng thêm câu trả lời của bạn hoặc cảm ơn trong các nhận xét không được đề cập đến. –