Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
224 views
in Technique[技术] by (71.8m points)

c# - Building Portable Class Library Project in build server fails

I've recently added some custom Portable Class Library projects to an application that is built in an build server. The build was working fine, but after that it stopped working and shows me the following messages:

C:WindowsMicrosoft.NETFramework64v4.0.30319Microsoft.Common.targets(983, 5): warning MSB3644: The reference assemblies for framework ".NETPortable,Version=v4.0,Profile=Profile136" were not found.

C:WindowsMicrosoft.NETFramework64v4.0.30319Microsoft.Common.targets(1578, 5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:WindowsMicrosoft.NETFramework64v4.0.30319mscorlib.dll", "AMD64".

error CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)

The build server specs:

The solution is a .NET 4.0 application and the portable projects target .NET4.0+ e Silverlight 5, only. portable targets

I have checked my development machine (Windows 8, Visual Studio 2012). There is indeed a folder "C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETPortablev4.0ProfileProfile136" (in fact, the profiles for .NET 4.0 go up to 158). In the build machine, however, there are only folders for profiles up to 131.

Is Portable Class Library Tools up to date? It seems it miss installing profiles for the most recent platforms.

UPDATE

I copied the ".NETPortablev4.0ProfileProfile136" of my development machine to the build server, and now the application builds successfully. I still would like to know why installing the Portable Class Library Tools does not work out of the box.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

A more general and elegant solution is to install the latest Microsoft .NET Portable Library Reference Assemblies. This will install profile138 among many others.

The standalone installer(s) can be found at:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...