development, Teamcity

坑爹的Windows build服务器搭建– build error CS0012

By jere on 2017-08-31 0 Comments

好久没有搞Windows 与.net了 因build服务器要迁移新搭建的teamcity,本以为很快就能完成的task,硬生生的搞了一天,坑爹的下面的错误:

...\xxxFact.cs(21, 10): error CS0012: The type 'Attribute' 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'.
...\xxxFilterFact.cs(29, 10): error CS0012: The type 'Attribute' 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'.

.net framework也装了呀,为什么不对?难道还需要再装Visual Studio到build server?

Google吧。。。

找到了类似的链接 , 试了下发现server上面还需要装上.NET Framework 4.6 Targeting Pack.
果然很久不做,跟不上形式了,但回过头再想想,微软有必要搞这么复杂吗?之前的装上.net framework能解决问题的方案多好啊!

打赏

Leave a comment

您的电子邮箱地址不会被公开。