MSbuild failure: error CS0246: The type or namespace name 'DataLoader_Accessor' could not be found

Error:

The type or namespace name ‘MyClass_Accessor’ could not be found (are you missing a using directive or an assembly reference?

Resolution:

Step 1: Deploy publicize component to the build server

Copy the following folder from your dev machine to your build server.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamTest
If your build-server is 64bit, also copy the folder to
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v9.0\TeamTest

Now if you run msbuild again, it should finally attempt to generate the private accessors. Howeve you will run into this error:

Could not load file or assembly ‘file:///C:\BuildServer\MySolution\MyProject\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll’ or one of its dependencies. The system cannot find the file specified.

This means we need to deploy an additional component..

Step 2: Deploy unit test framework to the build server

On your dev server, take the files Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll andMicrosoft.VisualStudio.QualityTools.Resource.dll from the GAC (c:\windows\assembly) and copy them into the project folder of the unit test, according to the error message.




https://adrianhenke.wordpress.com/2010/10/21/msbuild-and-private-accessors-of-unit-tests/

I resoved this issue on VS 2010 and Win 7


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值