安装文件的位置-程序文件(x86)\参考组件\微软\框架\。netframework \v4.5 !

时间:2022-05-28 15:04:22

Please bear with me on this, I will try to explain as clearly as I can.

请见谅,我会尽量解释清楚。

I started a new project (class library) which targets 4.5 and not the client profile 4.5.

我启动了一个新的项目(类库),目标是4.5,而不是客户机概要文件4.5。

I added a reference "System.Runtime.Serialization" and the properties indicates it's in location "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Runtime.Serialization.dll"

我添加了一个引用“System.Runtime”。“串行化”和属性指示它在“C:\程序文件(x86)\程序集”\Microsoft\Framework.NETFramework . v4.5\ system . runtime. serializ.dll”

On my pc it compiles fine with a build script using msbuild.

在我的电脑上,它可以很好地使用msbuild进行编译。

On the buildserver which uses team city - it complains

在使用team city的buildserver上—它会报错

error CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

错误CS0012:类型系统。对象'在未引用的程序集中定义。必须向程序集系统添加引用。运行时,Version = 4.0.0.0、文化=中立,都必须b03f5f7f11d50a3a”

The buildserver has the full .net framework installed - "dotnetfx45_full_x86_x64.exe"

构建服务器安装了完整的。net框架—“dotnetf45_full_x86_x64 .exe”

The only time it will build is if I copy my version of "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5" to the target machine.

它唯一的构建时间是我将我的“C:\程序文件(x86)\程序集”拷贝到目标机器上。

I have checked using this link and .net 4.5 is installed - http://myspworld.wordpress.com/2012/10/18/how-to-check-if-net-4-5-is-installed-on-a-server/

我已经使用这个链接进行了检查,并且安装了。net 4.5 - http://myspworld.wordpress.com/2012/10/18/how-to-check-if-net-4-5-is-in -a-server/

I am asking two question: 1. How does this get installed? 2. If it does find it in this location surely it should look in the GAC?

我想问两个问题:1。这是如何安装的?2。如果它真的在这个地方找到了,它肯定应该去找GAC?

Will appreciate any help on this.

非常感谢您的帮助。

1 个解决方案

#1


10  

It's the Windows SDK:

这是Windows SDK:

The Windows SDK includes the reference assemblies, tools, headers, and libraries needed to build applications that target the .NET Framework 4.5.

Windows SDK包括用于构建针对。net Framework 4.5的应用程序所需的引用程序集、工具、头文件和库。

(For 1.1 and 2.0, there was a separate .NET Framework SDK, but I can't find a link for any more recent versions - I don't think it's separately available)

(对于1.1和2.0,有一个单独的。net Framework SDK,但是我找不到任何最新版本的链接——我认为它不是单独可用的)


For part 2, no. The GAC is not searched at compile time. It's only used at runtime.

第2部分,不。在编译时不搜索GAC。它只在运行时使用。

#1


10  

It's the Windows SDK:

这是Windows SDK:

The Windows SDK includes the reference assemblies, tools, headers, and libraries needed to build applications that target the .NET Framework 4.5.

Windows SDK包括用于构建针对。net Framework 4.5的应用程序所需的引用程序集、工具、头文件和库。

(For 1.1 and 2.0, there was a separate .NET Framework SDK, but I can't find a link for any more recent versions - I don't think it's separately available)

(对于1.1和2.0,有一个单独的。net Framework SDK,但是我找不到任何最新版本的链接——我认为它不是单独可用的)


For part 2, no. The GAC is not searched at compile time. It's only used at runtime.

第2部分,不。在编译时不搜索GAC。它只在运行时使用。