【发布时间】:2021-06-27 00:21:00
【问题描述】:
我们在本地使用 ADO 2019,并且我们有一个构建服务器,我们可以在其中构建所有内容。我有一个 ASPNet 网页,开发人员已将第二个项目添加到 SLN 进行测试。
我收到以下错误
XYZ.Tests\Properties\PexAssemblyInfo.cs(15,12): Error CS0246: The type or namespace name 'PexAssemblySettingsAttribute' could not be found (are you missing a using directive or an assembly reference?)
XYZ.Tests\Properties\PexAssemblyInfo.cs(15,12): Error CS0246: The type or namespace name 'PexAssemblySettings' could not be found (are you missing a using directive or an assembly reference?)
XYZ.Tests\Properties\PexAssemblyInfo.cs(18,12): Error CS0246: The type or namespace name 'PexAssemblyUnderTestAttribute' could not be found (are you missing a using directive or an assembly reference?)
XYZ.Tests\Properties\PexAssemblyInfo.cs(18,12): Error CS0246: The type or namespace name 'PexAssemblyUnderTest' could not be found (are you missing a using directive or an assembly reference?)
XYZ.Tests\Properties\PexAssemblyInfo.cs(19,12): Error CS0246: The type or namespace name 'PexInstrumentAssemblyAttribute' could not be found (are you missing a using directive or an assembly reference?)
XYZ.Tests\Properties\PexAssemblyInfo.cs(19,12): Error CS0246: The type or namespace name 'PexInstrumentAssembly' could not be found (are you missing a using directive or an assembly reference?)
XYZ.Tests\Properties\PexAssemblyInfo.cs(20,12): Error CS0246: The type or namespace name 'PexInstrumentAssemblyAttribute' could not be found (are you missing a using directive or an assembly reference?)
XYZ.Tests\Properties\PexAssemblyInfo.cs(20,12): Error CS0246: The type or namespace name 'PexInstrumentAssembly' could not be found (are you missing a using directive or an assembly reference?)
XYZ.Tests\Properties\PexAssemblyInfo.cs(21,12): Error CS0246: The type or namespace name 'PexInstrumentAssemblyAttribute' could not be found (are you missing a using directive or an assembly reference?)
XYZ.Tests\Properties\PexAssemblyInfo.cs(21,12): Error CS0246: The type or namespace name 'PexInstrumentAssembly' could not be found (are you missing a using directive or an assembly reference?)
主项目的Bin 目录中有需要的Dll,但第二个项目的Bin 目录中没有文件。
我的 MSBuild 参数如下
/p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:PrecompileBeforePublish=true
/p:DeployDefaultTarget=WebPublish
/p:publishUrl="$(build.artifactstagingdirectory)\$(BuildConfiguration)\wwwroot"
/p:OutDir="\Bin\$(BuildConfiguration)"
我曾尝试使用 .csproj 预构建测试应用程序,但由于它自己没有失败的 SLN。
所有 Nuget 包都在 Packages 目录中,但我继续收到这些错误。我只是不知道它从哪里想要什么。
【问题讨论】:
标签: unit-testing tfsbuild msbuild-task