我正在为 C# 中的 VS 项目构建一个安装程序解决方案。 在编译过程中,我得到以下
warnings
:
WARNING: 'System.Linq.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Linq\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Linq.dll' is under Windows System File Protection.
WARNING: 'System.Net.Http.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll' is under Windows System File Protection.
WARNING: 'System.Collections.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Collections\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Collections.dll' is under Windows System File Protection.
WARNING: 'System.Runtime.Serialization.Primitives.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.Primitives\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Primitives.dll' is under Windows System File Protection.
WARNING: 'System.Diagnostics.Debug.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Diagnostics.Debug\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Diagnostics.Debug.dll' is under Windows System File Protection.
WARNING: 'System.Threading.Tasks.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Threading.Tasks\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.Tasks.dll' is under Windows System File Protection.
WARNING: 'System.Runtime.Extensions.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Extensions.dll' is under Windows System File Protection.
WARNING: 'System.IO.Compression.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.Compression\v4.0_4.0.0.0__b77a5c561934e089\System.IO.Compression.dll' is under Windows System File Protection.
WARNING: 'System.Reflection.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.dll' is under Windows System File Protection.
WARNING: 'System.Net.Http.WebRequest.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http.WebRequest\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.WebRequest.dll' is under Windows System File Protection.
WARNING: 'System.Runtime.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll' is under Windows System File Protection.
WARNING: 'System.Reflection.Extensions.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.Extensions.dll' is under Windows System File Protection.
WARNING: 'System.Threading.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Threading\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.dll' is under Windows System File Protection.
WARNING: 'System.Text.Encoding.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Text.Encoding\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Text.Encoding.dll' is under Windows System File Protection.
WARNING: 'System.Diagnostics.Tracing.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Diagnostics.Tracing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Diagnostics.Tracing.dll' is under Windows System File Protection.
WARNING: 'System.IO.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.dll' is under Windows System File Protection.
以及我认为相关的这些:
WARNING: Two or more objects have the same target location ('[targetdir]\system.reflection.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.reflection.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.net.http.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.net.http.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.runtime.extensions.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.runtime.extensions.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.threading.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.threading.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.diagnostics.debug.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.diagnostics.debug.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.threading.tasks.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.threading.tasks.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.runtime.serialization.primitives.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.runtime.serialization.primitives.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.io.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.io.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.text.encoding.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.text.encoding.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.io.compression.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.io.compression.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.diagnostics.tracing.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.diagnostics.tracing.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.reflection.extensions.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.reflection.extensions.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.linq.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.linq.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.collections.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.collections.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.runtime.dll')
WARNING: Two or more objects have the same target location ('[targetdir]\system.runtime.dll')
阅读一些相关帖子,我相信我应该从安装程序本身中删除这些 dll,即从安装程序解决方案的主要输出中删除......?这是正确的还是其他地方有问题?
另一个问题是 - 这会损害用户计算机上的任何功能吗?所有这些 dll 是否都存在于标准 Windows 上并且无需编译即可工作?
谢谢你
我面临着类似的问题...请问你有什么解决办法吗?