MSbuild failure: error CS0246: The type or namespace name 'DataLoader_Accessor' could not be found
2014-12-18 14:58
274 查看
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
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
相关文章推荐
- Unity使用FXMaker导致发布时报“The type or namespace name `UnityEditor' could not be found” 解决备忘
- The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace
- The type or namespace name `MovieTexture' could not be found. Are you missing an assembly reference?
- 关于错误 The type or namespace name `Vuforia' could not be found. Are you missing an assembly reference?
- Unity发布时出现“The type or namespace name `UnityEditor' could not be found.”
- The type or namespace name 'DbContext' could not be found-vs2012
- The type or namespace name 'Bitmap' could not be found (are you missing a using directive or an asse
- The type or namespace name '***' could not be found (are you missing a using directive or an asse
- .net4 wpf App 使用log4net 错误:The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)
- The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly refere
- The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace
- WCF分布式开发常见错误(4):The type or namespace name 'DataContract' could not be found DataContract找不到
- Unity发布时出现“The type or namespace name `UnityEditor' could not be found.” 错误
- 如何解决The type or namespace name 'ScriptService' could not be found (are you missing a using directive or an assembly reference?)
- The requested list key 'map' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or peopl
- CS0234 The type or namespace name 'Mvc' does not exist in the namespace 'Microsoft.AspNet' (are you
- The type or namespace name 'Windows' does not exist in the class or namespace 'System'
- The plugin 'org.apache.maven.plugins:maven-eclipse-plugin' does not exist or no valid version could be found 解决
- The controller for path '/favicon.ico' could not be found or it does not implement the IController interface./r/nParameter name:
- the language dll 'vbe6int.dll' could not be found