警告 CS0618:'ResourceManager.ResourceSets' 已过时:'call InternalGetResourceSet instead'
warning CS0618: 'ResourceManager.ResourceSets' is obsolete: 'call InternalGetResourceSet instead'
我在 DevOps 构建日志文件中看到此警告。
我在自己的计算机上构建时没有收到警告。
C:\Program Files (x86)\Microsoft Visual
Studio17\Enterprise\MSBuild.0\Bin\Roslyn\csc.exe /noconfig
/nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE
/highentropyva+ /reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.6.1\mscorlib.dll"
/reference:d:\a\s\Common\bin\Release\SBD.Common.dll
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Core.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Data.DataSetExtensions.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Data.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Drawing.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.ServiceModel.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Windows.Forms.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Xml.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Xml.Linq.dll"
/debug:pdbonly /filealign:512 /optimize+
/out:obj\Release\SBD.Common.WinForms.dll /ruleset:"C:\Program Files
(x86)\Microsoft Visual Studio17\Enterprise\Team Tools\Static
Analysis Tools\Rule Sets\MinimumRecommendedRules.ruleset"
/subsystemversion:6.00
/resource:obj\Release\SBD.Common.WinForms.AboutDialogBase.resources
/resource:obj\Release\SBD.Common.WinForms.DatabaseConnectDialog.resources
/resource:AboutIcon.ico,SBD.Common.WinForms.AboutIcon.ico
/resource:AboutTemplate.rtf,SBD.Common.WinForms.AboutTemplate.rtf
/target:library /utf8output AboutDialogBase.cs
AboutDialogBase.Designer.cs AuthenticateResult.cs CredentialsDialog.cs
CREDUI.cs DatabaseConnectDialog.cs DatabaseConnectDialog.Designer.cs
FileBasedResourceManager.cs FileBasedResourceSet.cs FormUtils.cs
MessagePop.cs Properties\AssemblyInfo.cs
"C:\Users\VssAdministrator\AppData\Local\Temp.NETFramework,Version=v4.6.1.AssemblyAttributes.cs"
Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual
Studio17\Enterprise\MSBuild.0\Bin\Roslyn
##[warning]Common.WinForms\FileBasedResourceManager.cs(72,62): Warning CS0618: 'ResourceManager.ResourceSets' is obsolete: 'call
InternalGetResourceSet instead'
该项目有以下内容
warning CS0618: 'ResourceManager.ResourceSets' is obsolete: 'call InternalGetResourceSet instead'
AFAIK,ResourceSets
在 .net 4.0
中已被废弃,因此切换到 4.5.2 将无法解决此警告。清除此警告,您可能需要切换 .net 3.5
及以下。
此外,您可以尝试日志中的建议,改用 call InternalGetResourceSet
。查看 the thread 了解更多详情。
希望这对您有所帮助。
我在 DevOps 构建日志文件中看到此警告。
我在自己的计算机上构建时没有收到警告。
C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\MSBuild.0\Bin\Roslyn\csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\mscorlib.dll" /reference:d:\a\s\Common\bin\Release\SBD.Common.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Drawing.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.ServiceModel.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Windows.Forms.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\SBD.Common.WinForms.dll /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\Team Tools\Static Analysis Tools\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /resource:obj\Release\SBD.Common.WinForms.AboutDialogBase.resources /resource:obj\Release\SBD.Common.WinForms.DatabaseConnectDialog.resources /resource:AboutIcon.ico,SBD.Common.WinForms.AboutIcon.ico /resource:AboutTemplate.rtf,SBD.Common.WinForms.AboutTemplate.rtf /target:library /utf8output AboutDialogBase.cs AboutDialogBase.Designer.cs AuthenticateResult.cs CredentialsDialog.cs CREDUI.cs DatabaseConnectDialog.cs DatabaseConnectDialog.Designer.cs FileBasedResourceManager.cs FileBasedResourceSet.cs FormUtils.cs MessagePop.cs Properties\AssemblyInfo.cs "C:\Users\VssAdministrator\AppData\Local\Temp.NETFramework,Version=v4.6.1.AssemblyAttributes.cs" Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\MSBuild.0\Bin\Roslyn ##[warning]Common.WinForms\FileBasedResourceManager.cs(72,62): Warning CS0618: 'ResourceManager.ResourceSets' is obsolete: 'call InternalGetResourceSet instead'
该项目有以下内容
warning CS0618: 'ResourceManager.ResourceSets' is obsolete: 'call InternalGetResourceSet instead'
AFAIK,ResourceSets
在 .net 4.0
中已被废弃,因此切换到 4.5.2 将无法解决此警告。清除此警告,您可能需要切换 .net 3.5
及以下。
此外,您可以尝试日志中的建议,改用 call InternalGetResourceSet
。查看 the thread 了解更多详情。
希望这对您有所帮助。